Re: [PATCH] fix: ath11k: ath11k_ahb_fw_resources_init: fix device_node reference leak on setup failure
From: WenTao Liang
Date: Sun Jun 28 2026 - 00:04:32 EST
> 2026年6月26日 23:36,WenTao Liang <vulab@xxxxxxxxxxx> 写道:
>
> of_get_child_by_name acquires a device_node reference. When the
> subsequent ath11k_ahb_setup_msa_resources call fails, the function
> returns immediately without calling of_node_put, leaking the node
> reference.
>
> Add of_node_put before returning on the setup failure error path.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: WenTao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/net/wireless/ath/ath11k/ahb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index 08d3a0c8f105..8a08275db40a 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -996,6 +996,7 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab)
> ret = ath11k_ahb_setup_msa_resources(ab);
> if (ret) {
> ath11k_err(ab, "failed to setup msa resources\n");
> + of_node_put(node);
> return ret;
> }
>
> --
> 2.39.5 (Apple Git-154)
Please ignore this patch. I will resend a proper version after
learning the kernel submission process.
Apologies for the noise.
Best regards,
WenTao Liang