mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
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
This commit is contained in:
parent
8fbeaca7a0
commit
90a9fb5b66
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue