Skip to content

Commit

Permalink
brcmfmac: check return value of driver_for_each_device()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Zhang Changzhong authored and Kalle Valo committed Sep 24, 2020
1 parent dd7a3a3 commit 72a398a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 72a398a

Please sign in to comment.