summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFariya Fatima <fariyaf@gmail.com>2014-04-02 09:29:52 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-04-09 13:55:53 -0400
commit57a2a093b42a2addeb18a22a5eab02579f4dc1d2 (patch)
treef45a347f12696fd42c07269eaefa8e456f7ab0bd /drivers
parentbff37af7f25919f1af3e8dac5a9263c63b533e74 (diff)
rsi: Fixed issue relating to variable de-referenced before check 'adapter'
Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_sdio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 852453f386e2..2e39d38d6a9e 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -756,12 +756,13 @@ fail:
static void rsi_disconnect(struct sdio_func *pfunction)
{
struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
- struct rsi_91x_sdiodev *dev =
- (struct rsi_91x_sdiodev *)adapter->rsi_dev;
+ struct rsi_91x_sdiodev *dev;
if (!adapter)
return;
+ dev = (struct rsi_91x_sdiodev *)adapter->rsi_dev;
+
dev->write_fail = 2;
rsi_mac80211_detach(adapter);