OSDN Git Service

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:20:20 +0000 (09:20 +0200)
commit0018c21f34d666c2755460123d9f37a02dc8ce60
treef2cfcd2a0b672d95f6a293d55e04f3c40b19a0d4
parent4135e588274e7b8ddeea95683f9d70f19d019f2e
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