diff options
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 4fce0baa0711..c27ffcfdbe88 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -460,6 +460,8 @@ static int __if_usb_submit_rx_urb(struct usb_card_rec *cardp, | |||
460 | if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) { | 460 | if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) { |
461 | /* handle failure conditions */ | 461 | /* handle failure conditions */ |
462 | lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed\n"); | 462 | lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed\n"); |
463 | kfree_skb(skb); | ||
464 | rinfo->skb = NULL; | ||
463 | ret = -1; | 465 | ret = -1; |
464 | } else { | 466 | } else { |
465 | /* lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB success\n"); */ | 467 | /* lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB success\n"); */ |
@@ -667,8 +669,10 @@ static void if_usb_receive(struct urb *urb) | |||
667 | lbs_deb_usbd(&cardp->udev->dev, | 669 | lbs_deb_usbd(&cardp->udev->dev, |
668 | "Recv length = 0x%x, Recv type = 0x%X\n", | 670 | "Recv length = 0x%x, Recv type = 0x%X\n", |
669 | recvlength, recvtype); | 671 | recvlength, recvtype); |
670 | } else if (urb->status) | 672 | } else if (urb->status) { |
673 | kfree_skb(skb); | ||
671 | goto rx_exit; | 674 | goto rx_exit; |
675 | } | ||
672 | 676 | ||
673 | switch (recvtype) { | 677 | switch (recvtype) { |
674 | case CMD_TYPE_DATA: | 678 | case CMD_TYPE_DATA: |