mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
wifi: ath12k: unify error handling in some ath12k_wmi_xxx() functions
This is purely cosmetic changes that simplifies & standardizes error handling for functions that ends with a ath12k_wmi_cmd_send() followed by trivial error handling. Saves a few lines of code too. Compile tested only. Signed-off-by: Nicolas Escande <nico.escande@gmail.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20260422163208.3013496-1-nico.escande@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
8c79aac429
commit
31d4f8d427
|
|
@ -4199,12 +4199,9 @@ int ath12k_wmi_pdev_lro_cfg(struct ath12k *ar,
|
|||
if (ret) {
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to send lro cfg req wmi cmd\n");
|
||||
goto err;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -4335,12 +4332,9 @@ int ath12k_wmi_vdev_spectral_conf(struct ath12k *ar,
|
|||
if (ret) {
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to send spectral scan config wmi cmd\n");
|
||||
goto err;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -4372,12 +4366,9 @@ int ath12k_wmi_vdev_spectral_enable(struct ath12k *ar, u32 vdev_id,
|
|||
if (ret) {
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to send spectral enable wmi cmd\n");
|
||||
goto err;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -4418,12 +4409,9 @@ int ath12k_wmi_pdev_dma_ring_cfg(struct ath12k *ar,
|
|||
if (ret) {
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to send dma ring cfg req wmi cmd\n");
|
||||
goto err;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -10801,10 +10789,9 @@ int ath12k_wmi_mlo_setup(struct ath12k *ar, struct wmi_mlo_setup_arg *mlo_params
|
|||
ath12k_warn(ar->ab, "failed to submit WMI_MLO_SETUP_CMDID command: %d\n",
|
||||
ret);
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath12k_wmi_mlo_ready(struct ath12k *ar)
|
||||
|
|
@ -10829,10 +10816,9 @@ int ath12k_wmi_mlo_ready(struct ath12k *ar)
|
|||
ath12k_warn(ar->ab, "failed to submit WMI_MLO_READY_CMDID command: %d\n",
|
||||
ret);
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath12k_wmi_mlo_teardown(struct ath12k *ar)
|
||||
|
|
@ -10858,10 +10844,9 @@ int ath12k_wmi_mlo_teardown(struct ath12k *ar)
|
|||
ath12k_warn(ar->ab, "failed to submit WMI MLO teardown command: %d\n",
|
||||
ret);
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ath12k_wmi_supports_6ghz_cc_ext(struct ath12k *ar)
|
||||
|
|
@ -10924,10 +10909,9 @@ int ath12k_wmi_send_vdev_set_tpc_power(struct ath12k *ar,
|
|||
if (ret) {
|
||||
ath12k_warn(ar->ab, "failed to send WMI_VDEV_SET_TPC_POWER_CMDID\n");
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user