aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmd.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-06-24 16:33:35 +0300
committerJohn W. Linville <linville@tuxdriver.com>2011-06-27 15:09:42 -0400
commita5e5aa6cee4cdb967a1f1c33a31165062783ccea (patch)
treec3e36575ff7495c5a70a567d7d4272acafc466ec /drivers/net/wireless/mwifiex/sta_cmd.c
parentath9k: Fix locking issue during tx completion (diff)
downloadlinux-dev-a5e5aa6cee4cdb967a1f1c33a31165062783ccea.tar.xz
linux-dev-a5e5aa6cee4cdb967a1f1c33a31165062783ccea.zip
mwifiex: restore handling of NULL parameters
Prior to a5ffddb70c5cab "mwifiex: remove casts of void pointers" the code assumed that the data_buf parameter could be a NULL pointer. The patch preserved some NULL checks but not consistently, so there was a potential for NULL dereferences and it changed the behavior. This patch restores the original behavior. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index d85a0a60aa6a..49b9c1309f7a 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -779,6 +779,8 @@ static int mwifiex_cmd_ibss_coalescing_status(struct host_cmd_ds_command *cmd,
case HostCmd_ACT_GEN_SET:
if (enable)
ibss_coal->enable = cpu_to_le16(*enable);
+ else
+ ibss_coal->enable = 0;
break;
/* In other case.. Nothing to do */