]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Fri, 31 May 2019 13:43:22 +0000 (06:43 -0700)
commitc3bbd47c07d454ed0b7f80f51c013543ffa3e2e3
treefd30615712a58a37f0cff2329364ce366c352def
parentf1df511d34aec569b618e5da080dafb734e8b723
slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register

[ Upstream commit 06d5d6b7f9948a89543e1160ef852d57892c750d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/slimbus/qcom-ngd-ctrl.c