summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_ioctl.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-10-05 14:58:24 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-10-11 16:41:11 -0400
commit3d82de0fa584fbe73cf74a3bbc906c8710c523b8 (patch)
tree7cc59834bd6e7b298b4ceca53ca4c48c9c74c3e0 /drivers/net/wireless/mwifiex/sta_ioctl.c
parentf49bbd2a45bf37d9fe202486712c89c214e33b5a (diff)
downloadblackbird-op-linux-3d82de0fa584fbe73cf74a3bbc906c8710c523b8.tar.gz
blackbird-op-linux-3d82de0fa584fbe73cf74a3bbc906c8710c523b8.zip
mwifiex: fix smatch errors
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52) error: potential null derefence 'priv'. drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52) error: we previously assumed 'priv' could be null (see line 820) drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24) error: potential null derefence 'local_tx_pd'. drivers/net/wireless/mwifiex/sta_ioctl.c +766 mwifiex_rate_ioctl_set_rate_value(30) error: buffer overflow 'rate' 14 <= 14 Cc: Dan Carpenter <dan.carpenter@oracle.com> 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/sta_ioctl.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 520800b618e7..f20550a7c525 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -763,7 +763,7 @@ static int mwifiex_rate_ioctl_set_rate_value(struct mwifiex_private *priv,
if ((rate[i] & 0x7f) == (rate_cfg->rate & 0x7f))
break;
}
- if (!rate[i] || (i == MWIFIEX_SUPPORTED_RATES)) {
+ if ((i == MWIFIEX_SUPPORTED_RATES) || !rate[i]) {
dev_err(adapter->dev, "fixed data rate %#x is out "
"of range\n", rate_cfg->rate);
return -1;
OpenPOWER on IntegriCloud