rtl8187: Fix error returns
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 14 Dec 2008 00:09:56 +0000 (18:09 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Dec 2008 20:23:16 +0000 (15:23 -0500)
There are two places in the rtl8187 code where a routine was returning zero
(OK) when it should have been returning an error.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8187_dev.c

index 74f5449b7924a01e4d0c8d3caa4fd739734da232..3900c479b4e7cbf26a228df8b4447002830444f3 100644 (file)
@@ -213,7 +213,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        urb = usb_alloc_urb(0, GFP_ATOMIC);
        if (!urb) {
                kfree_skb(skb);
-               return 0;
+               return -ENOMEM;
        }
 
        flags = skb->len;
@@ -281,7 +281,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        }
        usb_free_urb(urb);
 
-       return 0;
+       return rc;
 }
 
 static void rtl8187_rx_cb(struct urb *urb)