Message ID | 20190320152711.28749-1-pakki001@umn.edu (mailing list archive) |
---|---|
State | Mainlined |
Commit | 41f00e6e9e55546390031996b773e7f3c1d95928 |
Headers | show |
Series | [v3] usb: usb251xb: fix to avoid potential NULL pointer dereference | expand |
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 4d72b7d1d383..bbfdb7447d6f 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -612,7 +612,7 @@ static int usb251xb_probe(struct usb251xb *hub) dev); int err; - if (np) { + if (np && of_id) { err = usb251xb_get_ofdata(hub, (struct usb251xb_data *)of_id->data); if (err) {