Commit 1524cbf3 authored by Adrian Ratiu's avatar Adrian Ratiu Committed by Kalle Valo

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: default avatarMartyn Welch <martyn.welch@collabora.com>
Signed-off-by: default avatarAdrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3f1b32bd
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment