diff options
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8424478e0b76..bbe7f2eb8160 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -151,6 +151,7 @@ static void destroy_serial(struct kref *kref) | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | usb_put_intf(serial->interface); | ||
154 | usb_put_dev(serial->dev); | 155 | usb_put_dev(serial->dev); |
155 | kfree(serial); | 156 | kfree(serial); |
156 | } | 157 | } |
@@ -616,7 +617,7 @@ static struct usb_serial *create_serial(struct usb_device *dev, | |||
616 | } | 617 | } |
617 | serial->dev = usb_get_dev(dev); | 618 | serial->dev = usb_get_dev(dev); |
618 | serial->type = driver; | 619 | serial->type = driver; |
619 | serial->interface = interface; | 620 | serial->interface = usb_get_intf(interface); |
620 | kref_init(&serial->kref); | 621 | kref_init(&serial->kref); |
621 | mutex_init(&serial->disc_mutex); | 622 | mutex_init(&serial->disc_mutex); |
622 | serial->minor = SERIAL_TTY_NO_MINOR; | 623 | serial->minor = SERIAL_TTY_NO_MINOR; |