aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip/stub_rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/usbip/stub_rx.c')
-rw-r--r--drivers/usb/usbip/stub_rx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c
index e2b019532234..d3d360ff0d24 100644
--- a/drivers/usb/usbip/stub_rx.c
+++ b/drivers/usb/usbip/stub_rx.c
@@ -138,7 +138,9 @@ static int tweak_set_configuration_cmd(struct urb *urb)
req = (struct usb_ctrlrequest *) urb->setup_packet;
config = le16_to_cpu(req->wValue);
+ usb_lock_device(sdev->udev);
err = usb_set_configuration(sdev->udev, config);
+ usb_unlock_device(sdev->udev);
if (err && err != -ENODEV)
dev_err(&sdev->udev->dev, "can't set config #%d, error %d\n",
config, err);