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>
This commit is contained in:
Adrian Ratiu 2019-09-25 16:44:57 +03:00 committed by Kalle Valo
parent 3f1b32bdbb
commit 1524cbf362

View file

@ -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)