summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hcd.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-03 14:16:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-03 14:16:25 +0200
commitcb2e3d461b26f07540e0b898e0125137def2b015 (patch)
treea7d3c7f79bd26b15806565405522c7c7c0da44db /drivers/usb/core/hcd.c
parentd30eed1cd2b17f6140ec443f22a8e32f99cd99c1 (diff)
parenta71c9a1c779f2499fb2afc0553e543f18aff6edf (diff)
Merge 4.11-rc5 into usb-next
We want the usb fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r--drivers/usb/core/hcd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 2342c1ffd900..da7ee5735c14 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -520,8 +520,10 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
*/
tbuf_size = max_t(u16, sizeof(struct usb_hub_descriptor), wLength);
tbuf = kzalloc(tbuf_size, GFP_KERNEL);
- if (!tbuf)
- return -ENOMEM;
+ if (!tbuf) {
+ status = -ENOMEM;
+ goto err_alloc;
+ }
bufp = tbuf;
@@ -734,6 +736,7 @@ error:
}
kfree(tbuf);
+ err_alloc:
/* any errors get returned through the urb completion */
spin_lock_irq(&hcd_root_hub_lock);