2010-05-08 16:26:05

by Dan Carpenter

[permalink] [raw]
Subject: [patch 8/9] wl1271: fix notifier interface supported test

The "(wl == NULL)" test doesn't work here because "wl" is always
non-null. The intent of the code is to return if the interface
was not supported by the driver.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index b61cd10..55aa813 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -852,7 +852,7 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
if (wl == wl_temp)
break;
}
- if (wl == NULL)
+ if (wl != wl_temp)
return NOTIFY_DONE;

/* Get the interface IP address for the device. "ifa" will become


2010-05-11 04:28:03

by Luciano Coelho

[permalink] [raw]
Subject: Re: [patch 8/9] wl1271: fix notifier interface supported test

On Sat, 2010-05-08 at 18:25 +0200, ext Dan Carpenter wrote:
> The "(wl == NULL)" test doesn't work here because "wl" is always
> non-null. The intent of the code is to return if the interface
> was not supported by the driver.
>
> Signed-off-by: Dan Carpenter <[email protected]>
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> index b61cd10..55aa813 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -852,7 +852,7 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
> if (wl == wl_temp)
> break;
> }
> - if (wl == NULL)
> + if (wl != wl_temp)
> return NOTIFY_DONE;
>
> /* Get the interface IP address for the device. "ifa" will become

Thanks for the fix.

Acked-by: Luciano Coelho <[email protected]>


--
Cheers,
Luca.