* [PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter
@ 2017-12-26 17:33 Colin King
2017-12-26 18:17 ` Pavel Machek
2018-01-08 17:41 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-12-26 17:33 UTC (permalink / raw)
To: Kalle Valo, Pavel Machek, Cong Wang, Johannes Berg,
David S . Miller, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the less than zero error check on ret is incorrect
as it is checking a far earlier ret assignment rather than the
return from the call to wl1251_acx_arp_ip_filter. Fix this by
adding in the missing assginment.
Detected by CoverityScan, CID#1164835 ("Logically dead code")
Fixes: 204cc5c44fb6 ("wl1251: implement hardware ARP filtering")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ti/wl1251/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 6d02c660b4ab..037defd10b91 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -1200,8 +1200,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS);
enable = bss_conf->arp_addr_cnt == 1 && bss_conf->assoc;
- wl1251_acx_arp_ip_filter(wl, enable, addr);
-
+ ret = wl1251_acx_arp_ip_filter(wl, enable, addr);
if (ret < 0)
goto out_sleep;
}
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter
2017-12-26 17:33 [PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter Colin King
@ 2017-12-26 18:17 ` Pavel Machek
2018-01-08 17:41 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2017-12-26 18:17 UTC (permalink / raw)
To: Colin King
Cc: Kalle Valo, Cong Wang, Johannes Berg, David S . Miller,
linux-wireless, netdev, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
On Tue 2017-12-26 17:33:18, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the less than zero error check on ret is incorrect
> as it is checking a far earlier ret assignment rather than the
> return from the call to wl1251_acx_arp_ip_filter. Fix this by
> adding in the missing assginment.
>
> Detected by CoverityScan, CID#1164835 ("Logically dead code")
>
> Fixes: 204cc5c44fb6 ("wl1251: implement hardware ARP filtering")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Hmm. So yes, it might be correct. OTOH, this change may also break
something. So... how was it tested?
Pavel
> ---
> drivers/net/wireless/ti/wl1251/main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
> index 6d02c660b4ab..037defd10b91 100644
> --- a/drivers/net/wireless/ti/wl1251/main.c
> +++ b/drivers/net/wireless/ti/wl1251/main.c
> @@ -1200,8 +1200,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
> WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS);
>
> enable = bss_conf->arp_addr_cnt == 1 && bss_conf->assoc;
> - wl1251_acx_arp_ip_filter(wl, enable, addr);
> -
> + ret = wl1251_acx_arp_ip_filter(wl, enable, addr);
> if (ret < 0)
> goto out_sleep;
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wl1251: check return from call to wl1251_acx_arp_ip_filter
2017-12-26 17:33 [PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter Colin King
2017-12-26 18:17 ` Pavel Machek
@ 2018-01-08 17:41 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-08 17:41 UTC (permalink / raw)
To: Colin Ian King
Cc: Pavel Machek, Cong Wang, Johannes Berg, David S . Miller,
linux-wireless, netdev, kernel-janitors, linux-kernel
Colin Ian King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the less than zero error check on ret is incorrect
> as it is checking a far earlier ret assignment rather than the
> return from the call to wl1251_acx_arp_ip_filter. Fix this by
> adding in the missing assginment.
>
> Detected by CoverityScan, CID#1164835 ("Logically dead code")
>
> Fixes: 204cc5c44fb6 ("wl1251: implement hardware ARP filtering")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Patch applied to wireless-drivers-next.git, thanks.
ac1181c60822 wl1251: check return from call to wl1251_acx_arp_ip_filter
--
https://patchwork.kernel.org/patch/10133201/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-08 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 17:33 [PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter Colin King
2017-12-26 18:17 ` Pavel Machek
2018-01-08 17:41 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).