mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
ath10k: Fix error handling in ath10k_setup_msa_resources
[ Upstream commit9747a78d5f
] 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:727fec790e
("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>
This commit is contained in:
parent
9acf2e7cc4
commit
406ee04387
1 changed files with 1 additions and 1 deletions
|
@ -1556,11 +1556,11 @@ static int ath10k_setup_msa_resources(struct ath10k *ar, u32 msa_size)
|
|||
node = of_parse_phandle(dev->of_node, "memory-region", 0);
|
||||
if (node) {
|
||||
ret = of_address_to_resource(node, 0, &r);
|
||||
of_node_put(node);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to resolve msa fixed region\n");
|
||||
return ret;
|
||||
}
|
||||
of_node_put(node);
|
||||
|
||||
ar->msa.paddr = r.start;
|
||||
ar->msa.mem_size = resource_size(&r);
|
||||
|
|
Loading…
Add table
Reference in a new issue