diff options
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 6e8c527e07c9..27483f91a4a3 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -757,7 +757,7 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
757 | 757 | ||
758 | if (retval) { | 758 | if (retval) { |
759 | dbg("sub driver rejected device"); | 759 | dbg("sub driver rejected device"); |
760 | kfree(serial); | 760 | usb_serial_put(serial); |
761 | module_put(type->driver.owner); | 761 | module_put(type->driver.owner); |
762 | return retval; | 762 | return retval; |
763 | } | 763 | } |
@@ -829,7 +829,7 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
829 | */ | 829 | */ |
830 | if (num_bulk_in == 0 || num_bulk_out == 0) { | 830 | if (num_bulk_in == 0 || num_bulk_out == 0) { |
831 | dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); | 831 | dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); |
832 | kfree(serial); | 832 | usb_serial_put(serial); |
833 | module_put(type->driver.owner); | 833 | module_put(type->driver.owner); |
834 | return -ENODEV; | 834 | return -ENODEV; |
835 | } | 835 | } |
@@ -843,7 +843,7 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
843 | if (num_ports == 0) { | 843 | if (num_ports == 0) { |
844 | dev_err(&interface->dev, | 844 | dev_err(&interface->dev, |
845 | "Generic device with no bulk out, not allowed.\n"); | 845 | "Generic device with no bulk out, not allowed.\n"); |
846 | kfree(serial); | 846 | usb_serial_put(serial); |
847 | module_put(type->driver.owner); | 847 | module_put(type->driver.owner); |
848 | return -EIO; | 848 | return -EIO; |
849 | } | 849 | } |