aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-08-13 14:34:38 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-08-29 10:12:50 +0300
commitfd6729ec534cffbbeb3917761e6d1fe6a412d3fe (patch)
tree04aa5993fe460ca3330795f71fdb3bf78ac687df
parent7c48662b9d56666219f526a71ace8c15e6e12f1f (diff)
downloadlinux-fd6729ec534cffbbeb3917761e6d1fe6a412d3fe.tar.gz
ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
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> Link: https://lore.kernel.org/r/20210813113438.GB30697@kili
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index b137e7f3439791..bd1ef633499780 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].