forked from luck/tmp_suning_uos_patched
USB: keyspan: fix null-deref at disconnect and release
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. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ef6c8c1d73
commit
ff8a43c10f
|
@ -2303,7 +2303,7 @@ static int keyspan_startup(struct usb_serial *serial)
|
|||
if (d_details == NULL) {
|
||||
dev_err(&serial->dev->dev, "%s - unknown product id %x\n",
|
||||
__func__, le16_to_cpu(serial->dev->descriptor.idProduct));
|
||||
return 1;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Setup private data for serial driver */
|
||||
|
|
Loading…
Reference in New Issue
Block a user