diff options
author | Adrian Ratiu <adrian.ratiu@collabora.com> | 2019-09-25 15:44:57 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-10-01 11:14:20 +0200 |
commit | 1524cbf3621576c639405e7aabeac415f9617c8d (patch) | |
tree | 8b8b2efc45f0925907098281c70a86d8dbc4f4bd /drivers/net/wireless/broadcom/brcm80211 | |
parent | brcmsmac: remove a useless test (diff) | |
download | linux-1524cbf3621576c639405e7aabeac415f9617c8d.tar.xz linux-1524cbf3621576c639405e7aabeac415f9617c8d.zip |
brcmfmac: don't WARN when there are no requests
When n_reqs == 0 there is nothing to do so it doesn't make sense to
search for requests and issue a warning because none is found.
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c index 14e530601ef3..fabfbb0b40b0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c @@ -57,6 +57,10 @@ static int brcmf_pno_remove_request(struct brcmf_pno_info *pi, u64 reqid) mutex_lock(&pi->req_lock); + /* Nothing to do if we have no requests */ + if (pi->n_reqs == 0) + goto done; + /* find request */ for (i = 0; i < pi->n_reqs; i++) { if (pi->reqs[i]->reqid == reqid) |