diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-07 00:34:15 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-07 00:34:15 +0400 |
commit | a25a32ab71f822efb3e6025c365caa678aa6ff3b (patch) | |
tree | fcbc495baddf6d1837034cb83ee837887ea648f6 /drivers/net/wireless/wl12xx/testmode.c | |
parent | ec80bfcb68a0c46443991991d459a0cde773cdea (diff) | |
parent | 3d7dc7e8c1566acb0fc55df228b2ed91f5638e9d (diff) | |
download | linux-a25a32ab71f822efb3e6025c365caa678aa6ff3b.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/wl12xx/testmode.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/testmode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index e64403b6896d..6ec06a4a4c6d 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c @@ -204,7 +204,10 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[]) kfree(wl->nvs); - wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL); + if (len != sizeof(struct wl1271_nvs_file)) + return -EINVAL; + + wl->nvs = kzalloc(len, GFP_KERNEL); if (!wl->nvs) { wl1271_error("could not allocate memory for the nvs file"); ret = -ENOMEM; |