On 9/27/2025 3:56 AM, Loic Poulain wrote:
> ath10k_wmi_cmd_send takes ownership of the passed buffer (skb) and has the
> responsibility to release it in case of error. This patch fixes missing
> free in case of early error due to unhandled WMI command ID.
> 
> Tested-on: WCN3990 hw1.0 WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1
> 
> Fixes: 553215592f14 ("ath10k: warn if give WMI command is not supported")
> Suggested-by: Jeff Johnson <[email protected]>
> Signed-off-by: Loic Poulain <[email protected]>

Reviewed-by: Baochen Qiang <[email protected]>

> ---
>  v2: Fix typo in commit message (s/responsabily/responsibility)
> 
>  drivers/net/wireless/ath/ath10k/wmi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
> b/drivers/net/wireless/ath/ath10k/wmi.c
> index cb8ae751eb31..b4aad6604d6d 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -1938,6 +1938,7 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct 
> sk_buff *skb, u32 cmd_id)
>       if (cmd_id == WMI_CMD_UNSUPPORTED) {
>               ath10k_warn(ar, "wmi command %d is not supported by firmware\n",
>                           cmd_id);
> +             dev_kfree_skb_any(skb);
>               return ret;
>       }
>  


Reply via email to