summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/init.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-11-07 21:41:10 -0800
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 12:32:48 -0500
commit8ed1303321914a70ad580c1d034898e43c39b065 (patch)
tree6f550887cfb2d18a3e2e174ceba1a30483b711c2 /drivers/net/wireless/mwifiex/init.c
parent63af63330f4c8b4fdcc13dec082dea3b81d53b0a (diff)
mwifiex: fix 'Smatch' warnings
Following three warnings are fixed: >init.c +256 mwifiex_init_adapter(71) >warn: variable dereferenced before check 'adapter->sleep_cfm' >(see line 191) >sta_rx.c +193 mwifiex_process_sta_rx_packet(75) >warn: variable dereferenced before check 'priv' (see line 182) Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/init.c')
-rw-r--r--drivers/net/wireless/mwifiex/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index d792b3fb7c1..26940455255 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -187,8 +187,6 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
struct mwifiex_opt_sleep_confirm *sleep_cfm_buf = NULL;
skb_put(adapter->sleep_cfm, sizeof(struct mwifiex_opt_sleep_confirm));
- sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *)
- (adapter->sleep_cfm->data);
adapter->cmd_sent = false;
@@ -254,6 +252,8 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
mwifiex_wmm_init(adapter);
if (adapter->sleep_cfm) {
+ sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *)
+ adapter->sleep_cfm->data;
memset(sleep_cfm_buf, 0, adapter->sleep_cfm->len);
sleep_cfm_buf->command =
cpu_to_le16(HostCmd_CMD_802_11_PS_MODE_ENH);