summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorPaul Fox <pgf@laptop.org>2010-10-13 20:14:56 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-10-15 15:57:32 -0400
commit4f329c043ba3495f0f97ec782948cbba7bd01047 (patch)
treef553028a7574319331997111b2f20f3d51783e47 /drivers/net/wireless/libertas
parentd4659912b557e9f68c0ad8be14e2cafd3210dd16 (diff)
downloadblackbird-op-linux-4f329c043ba3495f0f97ec782948cbba7bd01047.tar.gz
blackbird-op-linux-4f329c043ba3495f0f97ec782948cbba7bd01047.zip
libertas: Communicate USB transfer errors
The return code was being overwritten with -1. Useful for debugging. Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/if_usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 238de10a4b57..b70f0f490118 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -484,11 +484,12 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
*/
static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb)
{
- int ret = -1;
+ int ret;
/* check if device is removed */
if (cardp->surprise_removed) {
lbs_deb_usbd(&cardp->udev->dev, "Device removed\n");
+ ret = -ENODEV;
goto tx_ret;
}
@@ -501,7 +502,6 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb
if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) {
lbs_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret);
- ret = -1;
} else {
lbs_deb_usb2(&cardp->udev->dev, "usb_submit_urb success\n");
ret = 0;
OpenPOWER on IntegriCloud