* [PATCH 1/1] staging: usbip: put usb_device and kill event handler thread in error cleanups.
@ 2012-11-06 8:10 Harvey Yang
0 siblings, 0 replies; only message in thread
From: Harvey Yang @ 2012-11-06 8:10 UTC (permalink / raw)
To: Greg Kroah-Hartman, Matt Mooney; +Cc: linux-kernel, linux-usb, harvey.yang
From: harvey.yang <harvey.huawei.yang@gmail.com>
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>
---
drivers/staging/usbip/stub_dev.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index c8d79a7..16a6868 100644
--- a/drivers/staging/usbip/stub_dev.c
+++ b/drivers/staging/usbip/stub_dev.c
@@ -432,6 +432,8 @@ static int stub_probe(struct usb_interface *interface,
dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid);
usb_set_intfdata(interface, NULL);
usb_put_intf(interface);
+ usb_put_dev(udev);
+ kthread_stop_put(sdev->ud.eh);
busid_priv->interf_count = 0;
busid_priv->sdev = NULL;
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-06 8:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06 8:10 [PATCH 1/1] staging: usbip: put usb_device and kill event handler thread in error cleanups Harvey Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®