summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFariya Fatima <fariyaf@gmail.com>2014-04-02 09:29:53 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-04-09 13:55:54 -0400
commitd50c761aefbd6785fd46ce4f7f387cf2aa749a2a (patch)
tree7e041d4a8a75387b5d06b64ce133f2f112ada4a9 /drivers/net
parent57a2a093b42a2addeb18a22a5eab02579f4dc1d2 (diff)
rsi: Fixed issue relating to return value.
Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_sdio_ops.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
index f1cb99cafed8..20d11ccfffe3 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
@@ -247,7 +247,7 @@ static int rsi_process_pkt(struct rsi_common *common)
if (!common->rx_data_pkt) {
rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n",
__func__);
- return -1;
+ return -ENOMEM;
}
status = rsi_sdio_host_intf_read_pkt(adapter,
@@ -260,12 +260,10 @@ static int rsi_process_pkt(struct rsi_common *common)
}
status = rsi_read_pkt(common, rcv_pkt_len);
- kfree(common->rx_data_pkt);
- return status;
fail:
kfree(common->rx_data_pkt);
- return -1;
+ return status;
}
/**