diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 46b3f19e0878..48b7fd071900 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1687,9 +1687,13 @@ static short rtl8192_usb_initendpoints(struct net_device *dev) #ifndef JACKSON_NEW_RX for (i = 0; i < (MAX_RX_URB + 1); i++) { priv->rx_urb[i] = usb_alloc_urb(0, GFP_KERNEL); + if (!priv->rx_urb[i]) + return -ENOMEM; priv->rx_urb[i]->transfer_buffer = kmalloc(RX_URB_SIZE, GFP_KERNEL); + if (!priv->rx_urb[i]->transfer_buffer) + return -ENOMEM; priv->rx_urb[i]->transfer_buffer_length = RX_URB_SIZE; } |