* [patch -next] wl12xx: fix recent change to wl1271_tm_cmd_nvs_push()
@ 2011-08-24 11:31 Dan Carpenter
2011-08-24 14:18 ` Luciano Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-08-24 11:31 UTC (permalink / raw)
To: Luciano Coelho, Shahar Levi
Cc: John W. Linville, open list:WL1271 WIRELESS D..., kernel-janitors
bc765bf3b9a "wl12xx: 1281/1283 support - Loading FW & NVS" had two
problems. The condition was written so that it failed if "len" was
not equal to sizeof(struct wl1271_nvs_file). Also we need to release
the locks on these new error paths.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c
index 88add68..10c1762 100644
--- a/drivers/net/wireless/wl12xx/testmode.c
+++ b/drivers/net/wireless/wl12xx/testmode.c
@@ -208,11 +208,17 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
kfree(wl->nvs);
- if ((wl->chip.id == CHIP_ID_1283_PG20) &&
- (len != sizeof(struct wl128x_nvs_file)))
- return -EINVAL;
- else if (len != sizeof(struct wl1271_nvs_file))
- return -EINVAL;
+ if (wl->chip.id == CHIP_ID_1283_PG20) {
+ if (len != sizeof(struct wl128x_nvs_file)) {
+ ret = -EINVAL;
+ goto out;
+ }
+ } else {
+ if (len != sizeof(struct wl1271_nvs_file)) {
+ ret = -EINVAL;
+ goto out;
+ }
+ }
wl->nvs = kzalloc(len, GFP_KERNEL);
if (!wl->nvs) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch -next] wl12xx: fix recent change to wl1271_tm_cmd_nvs_push()
2011-08-24 11:31 [patch -next] wl12xx: fix recent change to wl1271_tm_cmd_nvs_push() Dan Carpenter
@ 2011-08-24 14:18 ` Luciano Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2011-08-24 14:18 UTC (permalink / raw)
To: Dan Carpenter
Cc: Shahar Levi, John W. Linville, open list:WL1271 WIRELESS D...,
kernel-janitors
Hi Dan,
On Wed, 2011-08-24 at 14:31 +0300, Dan Carpenter wrote:
> bc765bf3b9a "wl12xx: 1281/1283 support - Loading FW & NVS" had two
> problems. The condition was written so that it failed if "len" was
> not equal to sizeof(struct wl1271_nvs_file). Also we need to release
> the locks on these new error paths.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks for your patch. But we have just removed this function, since
the implementation was broken and the feature is not really used
anymore.
The patch that removes this function entirely is already queued for
inclusion on the 3.1-rc series:
http://git.kernel.org/?p=linux/kernel/git/linville/wireless.git;a=commit;h=80900d0140a7648587982c8f299830e900e49165
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-24 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 11:31 [patch -next] wl12xx: fix recent change to wl1271_tm_cmd_nvs_push() Dan Carpenter
2011-08-24 14:18 ` Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox