Commit 91508a9a authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: keyspan: fix null-deref at disconnect and release

commit ff8a43c1 upstream.

Make sure to fail properly if the device is not accepted during attach
in order to avoid null-pointer derefs (of missing interface private
data) at disconnect or release.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f56852ae
...@@ -2315,7 +2315,7 @@ static int keyspan_startup(struct usb_serial *serial) ...@@ -2315,7 +2315,7 @@ static int keyspan_startup(struct usb_serial *serial)
if (d_details == NULL) { if (d_details == NULL) {
dev_err(&serial->dev->dev, "%s - unknown product id %x\n", dev_err(&serial->dev->dev, "%s - unknown product id %x\n",
__func__, le16_to_cpu(serial->dev->descriptor.idProduct)); __func__, le16_to_cpu(serial->dev->descriptor.idProduct));
return 1; return -ENODEV;
} }
/* Setup private data for serial driver */ /* Setup private data for serial driver */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment