]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Aug 2021 11:34:38 +0000 (14:34 +0300)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 11 Oct 2021 23:08:50 +0000 (17:08 -0600)
BugLink: https://bugs.launchpad.net/bugs/1946024
[ Upstream commit fd6729ec534cffbbeb3917761e6d1fe6a412d3fe ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/wireless/ath/ath6kl/wmi.c

index c610fe21c85c01575636a5cebd4638ef6ca9aa3f..31ffec3a5972789ee9d5309b674421d976e9b6cf 100644 (file)
@@ -2510,8 +2510,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].