Skip to content

Commit

Permalink
USB: keyspan: fix null-deref at disconnect and release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Aug 14, 2013
1 parent ef6c8c1 commit ff8a43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/keyspan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ff8a43c

Please sign in to comment.