diff options
author | Paul Fox <pgf@laptop.org> | 2010-10-13 15:14:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-15 15:57:32 -0400 |
commit | 4f329c043ba3495f0f97ec782948cbba7bd01047 (patch) | |
tree | f553028a7574319331997111b2f20f3d51783e47 | |
parent | d4659912b557e9f68c0ad8be14e2cafd3210dd16 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 4 |
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) | |||
484 | */ | 484 | */ |
485 | static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb) | 485 | static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb) |
486 | { | 486 | { |
487 | int ret = -1; | 487 | int ret; |
488 | 488 | ||
489 | /* check if device is removed */ | 489 | /* check if device is removed */ |
490 | if (cardp->surprise_removed) { | 490 | if (cardp->surprise_removed) { |
491 | lbs_deb_usbd(&cardp->udev->dev, "Device removed\n"); | 491 | lbs_deb_usbd(&cardp->udev->dev, "Device removed\n"); |
492 | ret = -ENODEV; | ||
492 | goto tx_ret; | 493 | goto tx_ret; |
493 | } | 494 | } |
494 | 495 | ||
@@ -501,7 +502,6 @@ static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb | |||
501 | 502 | ||
502 | if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) { | 503 | if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) { |
503 | lbs_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret); | 504 | lbs_deb_usbd(&cardp->udev->dev, "usb_submit_urb failed: %d\n", ret); |
504 | ret = -1; | ||
505 | } else { | 505 | } else { |
506 | lbs_deb_usb2(&cardp->udev->dev, "usb_submit_urb success\n"); | 506 | lbs_deb_usb2(&cardp->udev->dev, "usb_submit_urb success\n"); |
507 | ret = 0; | 507 | ret = 0; |