usb: use usb_serial_put in usb_serial_probe errors
authorJan Safrata <jan.nikitenko@gmail.com>
Tue, 22 May 2012 12:04:50 +0000 (14:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jun 2012 00:26:11 +0000 (17:26 -0700)
The use of kfree(serial) in error cases of usb_serial_probe
was invalid - usb_serial structure allocated in create_serial()
gets reference of usb_device that needs to be put, so we need
to use usb_serial_put() instead of simple kfree().

Signed-off-by: Jan Safrata <jan.nikitenko@gmail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found