diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 73c5d1a04135fc32aafda58f22976cb33a8cca67..131f73649b60d536f1df4d6c9e78e1598bc5e2f2 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1786,7 +1786,8 @@ int usb_set_configuration(struct usb_device *dev, int configuration) if (dev->actconfig && usb_disable_lpm(dev)) { dev_err(&dev->dev, "%s Failed to disable LPM\n.", __func__); mutex_unlock(hcd->bandwidth_mutex); - return -ENOMEM; + ret = -ENOMEM; + goto free_interfaces; } ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL); if (ret < 0) {