usb: usb251xb: fix to avoid potential NULL pointer dereference
authorAditya Pakki <pakki001@umn.edu>
Wed, 20 Mar 2019 15:27:11 +0000 (10:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:21:19 +0000 (09:21 +0200)
commitfacfcac8357da74e84a2a89fa836f668766b1fca
tree8cbe0ca7c86645f28e5411e4b014850a229074d8
parent3ce3290dee8440f60b59ad7da0be3ba97662eaa4
usb: usb251xb: fix to avoid potential NULL pointer dereference

[ Upstream commit 41f00e6e9e55546390031996b773e7f3c1d95928 ]

of_match_device in usb251xb_probe can fail and returns a NULL pointer.
The patch avoids a potential NULL pointer dereference in this scenario.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/usb/misc/usb251xb.c