Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> --- drivers/usb/serial/bus.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index b730366d524f..4b34afc51535 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -80,8 +80,15 @@ static int usb_serial_device_probe(struct device *dev) } minor = port->minor; - tty_register_device_attr(usb_serial_tty_driver, minor, dev, NULL, - usb_serial_dev_groups); + dev = tty_register_device_attr(usb_serial_tty_driver, minor, dev, NULL, + usb_serial_dev_groups); + if (IS_ERR(dev)) { + retval = PTR_ERR(dev); + if (driver->port_remove) + driver->port_remove(port); + goto exit_with_autopm; + } + dev_info(&port->serial->dev->dev, "%s converter now attached to ttyUSB%d\n", driver->description, minor); -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html