summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariya Fatima <fariyaf@gmail.com>2014-04-02 05:59:52 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-04-09 19:55:53 +0200
commit57a2a093b42a2addeb18a22a5eab02579f4dc1d2 (patch)
treef45a347f12696fd42c07269eaefa8e456f7ab0bd
parentrsi: Fixed signedness bug reported by static code analyzer. (diff)
downloadlinux-57a2a093b42a2addeb18a22a5eab02579f4dc1d2.tar.xz
linux-57a2a093b42a2addeb18a22a5eab02579f4dc1d2.zip
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>
-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);