Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) {
/* handle failure conditions */
lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB failed\n");
+ kfree_skb(skb);
+ rinfo->skb = NULL;
ret = -1;
} else {
/* lbs_deb_usbd(&cardp->udev->dev, "Submit Rx URB success\n"); */
lbs_deb_usbd(&cardp->udev->dev,
"Recv length = 0x%x, Recv type = 0x%X\n",
recvlength, recvtype);
- } else if (urb->status)
+ } else if (urb->status) {
+ kfree_skb(skb);
goto rx_exit;
+ }
switch (recvtype) {
case CMD_TYPE_DATA: