]> git.baikalelectronics.ru Git - kernel.git/commit
usb: phy: msm: fix a possible NULL dereference
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Tue, 24 Nov 2015 14:34:09 +0000 (15:34 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 8 Dec 2015 14:13:28 +0000 (08:13 -0600)
commit1ac713b4fe380c86addc8dd3ebb83c7fb787c1ab
tree74a4b331f38f97eff8615c5af2c6dea8620023b0
parent9ee85f69c12f14c9ee5142e2a0ae7a13916882d7
usb: phy: msm: fix a possible NULL dereference

of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Even if the probability of this case is very low, fixing it made
static analyzers happy.
Solving this with of_device_get_match_data made also code simplier.

Reported-by: coverity (CID 1324133)
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-msm-usb.c