linux/drivers/slimbus
Colin Ian King 7dde60c06c slimbus: avoid null pointer dereference on msg
The pointer msg is checked to see if it is null at the start of
the function and jumps to the error exit label reterr that then
dereferences msg when it prints a dev_err error message. Avoid
this potential null pointer dereference by only printing the
error message if msg is not null.

Detected by CoverityScan, CID#1463141 ("Dereference after null check")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 17:00:13 +01:00
..
core.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
Kconfig slimbus: qcom: Add Qualcomm Slimbus controller driver 2017-12-19 11:01:03 +01:00
Makefile slimbus: qcom: Add Qualcomm Slimbus controller driver 2017-12-19 11:01:03 +01:00
messaging.c slimbus: avoid null pointer dereference on msg 2018-01-09 17:00:13 +01:00
qcom-ctrl.c slimbus: qcom-ctrl: use normal allocation 2018-01-02 17:05:17 +01:00
sched.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
slimbus.h slimbus: core: add common defines required for controllers 2017-12-19 11:01:03 +01:00