[PATCH] ath10k: clear QMI if failed during init

Brian Norris briannorris at chromium.org
Tue Sep 15 10:26:31 PDT 2026


On Mon, Sep 14, 2026 at 03:05:19PM +0200, Albert Esteve wrote:
> A failed ath10k_qmi_init() left a dangling
> pointer (ar_snoc->qmi) in the cleanup path.
> Clear the pointer on the way out for hygiene
> and consistency with deinit().
> 
> Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")

It's all going away (probe failure / removal) if we get here anyway, so
this hardly qualifies as a "fix". In fact, in a cursory check of the
driver, it seems the NULL-ability of the ar_snoc->qmi field is totally
irrelevant to this driver -- it never is actually checked.

I suppose you can still call it "hygiene" though, and it's probably
reasonable to do the same here as we do in deinit().

> Signed-off-by: Albert Esteve <aesteve at redhat.com>

Reviewed-by: Brian Norris <briannorris at chromium.org>

> ---
>  drivers/net/wireless/ath/ath10k/qmi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
> index 0d74548a5f34..08a64f737fb4 100644
> --- a/drivers/net/wireless/ath/ath10k/qmi.c
> +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> @@ -1128,6 +1128,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
>  
>  err:
>  	kfree(qmi);
> +	ar_snoc->qmi = NULL;
>  	return ret;
>  }
>  
> 
> ---
> base-commit: bc35965f6940a9bf834d54187b6088b8eb09206d
> change-id: 20260914-fix-ath10k-dangling-15676d427cbb
> 
> Best regards,
> -- 
> Albert Esteve <aesteve at redhat.com>
> 



More information about the ath10k mailing list