diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-09-19 10:06:31 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-09-24 18:47:55 +0300 |
commit | 72a398a63b88921067ba275e701d19eb442638cd (patch) | |
tree | 2200f07a864d72e7887e13f7ba5effe699953b1f /drivers/net/wireless/broadcom | |
parent | dd7a3a331f5dec4f61fa2ba48512125a89401c25 (diff) | |
download | linux-72a398a63b88921067ba275e701d19eb442638cd.tar.bz2 |
brcmfmac: check return value of driver_for_each_device()
Fixes the following W=1 kernel build warning(s):
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1576:6: warning:
variable 'ret' set but not used [-Wunused-but-set-variable]
1576 | int ret;
| ^~~
driver_for_each_device() has been declared with __must_check, so the
return value should be checked.
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1600481191-14250-1-git-send-email-zhangchangzhong@huawei.com
Diffstat (limited to 'drivers/net/wireless/broadcom')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index ac5463838fcf..6f67fefe4b58 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -1578,6 +1578,9 @@ void brcmf_usb_exit(void) brcmf_dbg(USB, "Enter\n"); ret = driver_for_each_device(drv, NULL, NULL, brcmf_usb_reset_device); + if (ret) + brcmf_err("failed to reset all usb devices %d\n", ret); + usb_deregister(&brcmf_usbdrvr); } |