diff options
Diffstat (limited to 'drivers/net/irda/irda-usb.c')
-rw-r--r-- | drivers/net/irda/irda-usb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index e8e33bb9d876..2c9b3af16612 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -1651,6 +1651,8 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1651 | 1651 | ||
1652 | self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *), | 1652 | self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *), |
1653 | GFP_KERNEL); | 1653 | GFP_KERNEL); |
1654 | if (!self->rx_urb) | ||
1655 | goto err_free_net; | ||
1654 | 1656 | ||
1655 | for (i = 0; i < self->max_rx_urb; i++) { | 1657 | for (i = 0; i < self->max_rx_urb; i++) { |
1656 | self->rx_urb[i] = usb_alloc_urb(0, GFP_KERNEL); | 1658 | self->rx_urb[i] = usb_alloc_urb(0, GFP_KERNEL); |
@@ -1783,6 +1785,8 @@ err_out_2: | |||
1783 | err_out_1: | 1785 | err_out_1: |
1784 | for (i = 0; i < self->max_rx_urb; i++) | 1786 | for (i = 0; i < self->max_rx_urb; i++) |
1785 | usb_free_urb(self->rx_urb[i]); | 1787 | usb_free_urb(self->rx_urb[i]); |
1788 | kfree(self->rx_urb); | ||
1789 | err_free_net: | ||
1786 | free_netdev(net); | 1790 | free_netdev(net); |
1787 | err_out: | 1791 | err_out: |
1788 | return ret; | 1792 | return ret; |