mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
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:
parent
3f1b32bdbb
commit
1524cbf362
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue