aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip/stub_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/usbip/stub_main.c')
-rw-r--r--drivers/usb/usbip/stub_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
index c31c8402a0c5..d41d0cdeec0f 100644
--- a/drivers/usb/usbip/stub_main.c
+++ b/drivers/usb/usbip/stub_main.c
@@ -186,7 +186,12 @@ static ssize_t rebind_store(struct device_driver *dev, const char *buf,
186 if (!bid) 186 if (!bid)
187 return -ENODEV; 187 return -ENODEV;
188 188
189 /* device_attach() callers should hold parent lock for USB */
190 if (bid->udev->dev.parent)
191 device_lock(bid->udev->dev.parent);
189 ret = device_attach(&bid->udev->dev); 192 ret = device_attach(&bid->udev->dev);
193 if (bid->udev->dev.parent)
194 device_unlock(bid->udev->dev.parent);
190 if (ret < 0) { 195 if (ret < 0) {
191 dev_err(&bid->udev->dev, "rebind failed\n"); 196 dev_err(&bid->udev->dev, "rebind failed\n");
192 return ret; 197 return ret;