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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)