Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff8a43c1 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef6c8c1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */