Commit 695bcb1c authored by Harvey Yang's avatar Harvey Yang Committed by Greg Kroah-Hartman

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: default avatarharvey.yang <harvey.huawei.yang@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a68292fc
...@@ -433,6 +433,8 @@ static int stub_probe(struct usb_interface *interface, ...@@ -433,6 +433,8 @@ static int stub_probe(struct usb_interface *interface,
dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid); dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid);
usb_set_intfdata(interface, NULL); usb_set_intfdata(interface, NULL);
usb_put_intf(interface); usb_put_intf(interface);
usb_put_dev(udev);
kthread_stop_put(sdev->ud.eh);
busid_priv->interf_count = 0; busid_priv->interf_count = 0;
busid_priv->sdev = NULL; busid_priv->sdev = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment