diff options
author | Fariya Fatima <fariyaf@gmail.com> | 2014-04-02 05:59:52 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-04-09 19:55:53 +0200 |
commit | 57a2a093b42a2addeb18a22a5eab02579f4dc1d2 (patch) | |
tree | f45a347f12696fd42c07269eaefa8e456f7ab0bd | |
parent | rsi: Fixed signedness bug reported by static code analyzer. (diff) | |
download | linux-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.c | 5 |
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); |