linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
@ 2021-08-13 11:34 Dan Carpenter
  2021-08-29  7:12 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-13 11:34 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Raja Mani, Vasanthakumar Thiagarajan, Suraj Sumangala,
	linux-wireless, kernel-janitors

This error path is unlikely because of it checked for NULL and
returned -ENOMEM earlier in the function.  But it should return
an error code here as well if we ever do hit it because of a
race condition or something.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/ath/ath6kl/wmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index b137e7f34397..bd1ef6334997 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2504,8 +2504,10 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx)
 		goto free_data_skb;
 
 	for (index = 0; index < num_pri_streams; index++) {
-		if (WARN_ON(!data_sync_bufs[index].skb))
+		if (WARN_ON(!data_sync_bufs[index].skb)) {
+			ret = -ENOMEM;
 			goto free_data_skb;
+		}
 
 		ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev,
 					       data_sync_bufs[index].
-- 
2.20.1


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

* Re: [PATCH] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
  2021-08-13 11:34 [PATCH] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() Dan Carpenter
@ 2021-08-29  7:12 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-08-29  7:12 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Raja Mani, Vasanthakumar Thiagarajan, Suraj Sumangala,
	linux-wireless, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> wrote:

> This error path is unlikely because of it checked for NULL and
> returned -ENOMEM earlier in the function.  But it should return
> an error code here as well if we ever do hit it because of a
> race condition or something.
> 
> Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

fd6729ec534c ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210813113438.GB30697@kili/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2021-08-29  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 11:34 [PATCH] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() Dan Carpenter
2021-08-29  7:12 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).