[PATCH ath-next v2] wifi: ath12k: Fix NAPI resource leaks in AHB external IRQ paths

Jeff Johnson jeff.johnson at oss.qualcomm.com
Fri Oct 9 13:17:14 PDT 2026


On 9/30/2026 9:54 PM, Aaradhana Sahu wrote:
>  static int ath12k_ahb_config_irq(struct ath12k_base *ab)
> @@ -1353,7 +1382,7 @@ static int ath12k_ahb_probe(struct platform_device *pdev)
>  	ret = ab_ahb->device_family_ops->arch_init(ab);
>  	if (ret) {
>  		ath12k_err(ab, "AHB arch_init failed %d\n", ret);
> -		goto err_rproc_deconfigure;
> +		goto err_free_irq;
>  	}
>  
>  	ret = ath12k_core_init(ab);
> @@ -1367,6 +1396,9 @@ static int ath12k_ahb_probe(struct platform_device *pdev)
>  err_deinit_arch:
>  	ab_ahb->device_family_ops->arch_deinit(ab);
>  
> +err_free_irq:

my review agent notes:
**Misleading label name `err_free_irq`**

The label name implies IRQ teardown, but the IRQs registered via
`devm_request_irq()` are automatically freed on device detach — no explicit
free is needed here. This label only frees NAPI/netdev resources. Suggest
renaming to `err_free_ext_napi` or `err_free_napi` to match the actual
operation and avoid confusing future readers.

No need to post a new version just for this -- I'll make this change in my
'pending' branch if the reviewers are otherwise ok with your patch

> +	ath12k_ahb_free_ext_napi(ab);
> +
>  err_rproc_deconfigure:
>  	mutex_lock(&ath12k_rproc_info_lock);
>  	ath12k_ahb_deconfigure_rproc(ab);



More information about the ath12k mailing list