[PATCH] wifi: wcn36xx: Fix tx-rings-empty state leak in platform_get_resources()

From: Wentao Liang

Date: Thu Sep 17 2026 - 08:40:04 EST


wcn36xx_platform_get_resources() gets the "tx-rings-empty" smem state,
which holds a reference, but only the wcn36xx_remove() path releases it.
The reference is leaked on all the error paths taken when the mmio node
cannot be parsed or the CCU or DXE memory cannot be mapped. Release it in
the common cleanup label.

Fixes: f303a9311065 ("wcn36xx: Transition driver to SMD client")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
drivers/net/wireless/ath/wcn36xx/main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index f34d64464f64..a55861e65481 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1555,6 +1555,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
put_mmio_node:
of_node_put(mmio_node);
qcom_smem_state_put(wcn->tx_enable_state);
+ qcom_smem_state_put(wcn->tx_rings_empty_state);
return ret;
}

--
2.34.1