Skip to content

Commit

Permalink
staging: usbip: put usb_device and kill event handler thread in error…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Harvey Yang authored and Greg Kroah-Hartman committed Nov 13, 2012
1 parent a68292f commit 695bcb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/usbip/stub_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,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;
Expand Down

0 comments on commit 695bcb1

Please sign in to comment.