aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/stub_dev.c
diff options
context:
space:
mode:
authorHarvey Yang <harvey.huawei.yang@gmail.com>2012-11-06 03:10:29 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-13 16:08:48 -0500
commit695bcb1c0a50e8fe04f0ab868cac849130788bc0 (patch)
treec0bf6692aaf4878bb52cc59159b6eb1cbce3e62e /drivers/staging/usbip/stub_dev.c
parenta68292fce139f88bb85b8a53ac9df376063172c3 (diff)
staging: usbip: put usb_device and kill event handler thread in error cleanups.
If probe returns with error, the kthread is still alive even when all usbip modules unloaded. So do cleanups in error handler. Signed-off-by: harvey.yang <harvey.huawei.yang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/usbip/stub_dev.c')
-rw-r--r--drivers/staging/usbip/stub_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index 79298d06863..ee36415eb26 100644
--- a/drivers/staging/usbip/stub_dev.c
+++ b/drivers/staging/usbip/stub_dev.c
@@ -433,6 +433,8 @@ static int stub_probe(struct usb_interface *interface,
433 dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid); 433 dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid);
434 usb_set_intfdata(interface, NULL); 434 usb_set_intfdata(interface, NULL);
435 usb_put_intf(interface); 435 usb_put_intf(interface);
436 usb_put_dev(udev);
437 kthread_stop_put(sdev->ud.eh);
436 438
437 busid_priv->interf_count = 0; 439 busid_priv->interf_count = 0;
438 busid_priv->sdev = NULL; 440 busid_priv->sdev = NULL;