summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/usb.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2013-01-25 18:23:00 -0800
committerJohn W. Linville <linville@tuxdriver.com>2013-01-30 15:07:05 -0500
commit5b2e2eccab80e2f56d06df582e473fb0d8630f35 (patch)
tree29e778882c1742943f3a5201ab3903254b985843 /drivers/net/wireless/mwifiex/usb.c
parent3220712d3aa4f5df12b7305ce340f6d216a84477 (diff)
mwifiex: do not overwrite error code from lower layer driver
Instead of converting it to a bogus error code -1, we should return the original error code from lower layer driver. This error code will be printed so it may give user some clues on what has happened. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/usb.c')
-rw-r--r--drivers/net/wireless/mwifiex/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c
index 5d4a10a8a00..f90fe21e5bf 100644
--- a/drivers/net/wireless/mwifiex/usb.c
+++ b/drivers/net/wireless/mwifiex/usb.c
@@ -672,7 +672,7 @@ static int mwifiex_write_data_sync(struct mwifiex_adapter *adapter, u8 *pbuf,
*len, &actual_length, timeout);
if (ret) {
dev_err(adapter->dev, "usb_bulk_msg for tx failed: %d\n", ret);
- ret = -1;
+ return ret;
}
*len = actual_length;
@@ -691,7 +691,7 @@ static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, u8 *pbuf,
*len, &actual_length, timeout);
if (ret) {
dev_err(adapter->dev, "usb_bulk_msg for rx failed: %d\n", ret);
- ret = -1;
+ return ret;
}
*len = actual_length;