]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: Fix error handling in ath10k_setup_msa_resources
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 07:02:38 +0000 (07:02 +0000)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 10 Mar 2022 15:52:18 +0000 (17:52 +0200)
commitba36fe685125e7d2396f49033795ed0f09672ae8
treeb0f38602f6dc9d574d0b51ab7cd0a989e5d442c7
parentd3e4261bab8fd6c9c040706f0a3d436f6c2eef45
ath10k: Fix error handling in ath10k_setup_msa_resources

The device_node pointer is returned by of_parse_phandle() with refcount
incremented. We should use of_node_put() on it when done.

This function only calls of_node_put() in the regular path.
And it will cause refcount leak in error path.

Fixes: 150fd5fc79d9 ("ath10k: Setup the msa resources before qmi init")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220308070238.19295-1-linmq006@gmail.com
drivers/net/wireless/ath/ath10k/snoc.c