Skip to content

Commit ff8a43c

Browse files
jhovoldgregkh
authored andcommitted
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: [email protected] Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ef6c8c1 commit ff8a43c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/serial/keyspan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ static int keyspan_startup(struct usb_serial *serial)
23032303
if (d_details == NULL) {
23042304
dev_err(&serial->dev->dev, "%s - unknown product id %x\n",
23052305
__func__, le16_to_cpu(serial->dev->descriptor.idProduct));
2306-
return 1;
2306+
return -ENODEV;
23072307
}
23082308

23092309
/* Setup private data for serial driver */

0 commit comments

Comments
 (0)