summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorKalle Valo <quic_kvalo@quicinc.com>2023-06-09 17:24:31 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2023-06-13 12:10:43 +0300
commit90a9fb5b6618ae070c94b2141ec5de6a2a207eae (patch)
treec84c3f2ab0a3ae5ba2b56faf77bd6582a57a9c14 /drivers/net/wireless/ath
parent8fbeaca7a001cf6e854fceade17865c7b23b3ce2 (diff)
wifi: ath11k: wmi: cleanup error handling in ath11k_wmi_send_init_country_cmd()
The error handling doesn't follow the preferred style so fix that. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230609142440.24643-7-kvalo@kernel.org
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath11k/wmi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 6ce36879a503..3b26e227e80c 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -2866,21 +2866,25 @@ ath11k_wmi_send_init_country_cmd(struct ath11k *ar,
cmd->cc_info.regdom_id = init_cc_params.cc_info.regdom_id;
break;
default:
+ ath11k_warn(ar->ab, "unknown cc params flags: 0x%x",
+ init_cc_params.flags);
ret = -EINVAL;
- goto out;
+ goto err;
}
ret = ath11k_wmi_cmd_send(wmi, skb,
WMI_SET_INIT_COUNTRY_CMDID);
-
-out:
if (ret) {
ath11k_warn(ar->ab,
"failed to send WMI_SET_INIT_COUNTRY CMD :%d\n",
ret);
- dev_kfree_skb(skb);
+ goto err;
}
+ return 0;
+
+err:
+ dev_kfree_skb(skb);
return ret;
}