Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd6bfcc3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

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



[ 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: bdcd8170 ("Add ath6kl cleaned up driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210813113438.GB30697@kili


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 600624ec
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2513,8 +2513,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].