public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] brcmfmac: don't WARN when there are no requests
@ 2019-09-25 13:44 Adrian Ratiu
  2019-09-25 13:44 ` [PATCH 2/2] brcmfmac: fix suspend/resume when power is cut off Adrian Ratiu
  2019-10-01  9:14 ` [PATCH 1/2] brcmfmac: don't WARN when there are no requests Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Ratiu @ 2019-09-25 13:44 UTC (permalink / raw)
  To: brcm80211-dev-list.pdl; +Cc: linux-wireless, netdev, linux-kernel, Martyn Welch

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>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 4 ++++
 1 file changed, 4 insertions(+)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-01  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-25 13:44 [PATCH 1/2] brcmfmac: don't WARN when there are no requests Adrian Ratiu
2019-09-25 13:44 ` [PATCH 2/2] brcmfmac: fix suspend/resume when power is cut off Adrian Ratiu
2019-10-01  9:14 ` [PATCH 1/2] brcmfmac: don't WARN when there are no requests Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox