]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:39 +0000 (14:23 +0200)
commitf482266d3eb7a26548373f87d7d78f1628c5ef9d
treeb41e4d68c3d3dc1e66b6c1156a52163ac0cbb5f4
parent53e921cee6f06b79d7d07e7485d698e3d374d1f9
ath10k: Fix error handling in ath10k_setup_msa_resources

[ Upstream commit 7c7c895a5c91ccdff8f2485305327a1c4c2c4de6 ]

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: cd8407c3146e ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/snoc.c