|
@@ -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_size = max_t(u16, sizeof(struct usb_hub_descriptor), wLength);
|
|
tbuf = kzalloc(tbuf_size, GFP_KERNEL);
|
|
tbuf = kzalloc(tbuf_size, GFP_KERNEL);
|
|
- if (!tbuf)
|
|
|
|
- return -ENOMEM;
|
|
|
|
|
|
+ if (!tbuf) {
|
|
|
|
+ status = -ENOMEM;
|
|
|
|
+ goto err_alloc;
|
|
|
|
+ }
|
|
|
|
|
|
bufp = tbuf;
|
|
bufp = tbuf;
|
|
|
|
|
|
@@ -734,6 +736,7 @@ error:
|
|
}
|
|
}
|
|
|
|
|
|
kfree(tbuf);
|
|
kfree(tbuf);
|
|
|
|
+ err_alloc:
|
|
|
|
|
|
/* any errors get returned through the urb completion */
|
|
/* any errors get returned through the urb completion */
|
|
spin_lock_irq(&hcd_root_hub_lock);
|
|
spin_lock_irq(&hcd_root_hub_lock);
|