OSDN Git Service

slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register
authorKangjie Lu <kjlu@umn.edu>
Sat, 13 Apr 2019 10:34:47 +0000 (11:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 20:23:06 +0000 (22:23 +0200)
commit06d5d6b7f9948a89543e1160ef852d57892c750d
tree5cc169094ac96f69f1cdff58f5046b5b0a18734b
parentb281218ad4311a0342a40cb02fb17a363df08b48
slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register

In case platform_device_alloc fails, the fix returns an error
code to avoid the NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/qcom-ngd-ctrl.c