Skip to content
Commit dd5a6c5a authored by Liang He's avatar Liang He Committed by Greg Kroah-Hartman
Browse files

dmaengine: ti: k3-udma-private: Fix refcount leak bug in of_xudma_dev_get()

[ Upstream commit f9fdb0b8 ]

We should call of_node_put() for the reference returned by
of_parse_phandle() in fail path or when it is not used anymore.
Here we only need to move the of_node_put() before the check.

Fixes: d7024191

 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users")
Signed-off-by: default avatarLiang He <windhl@126.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220720073234.1255474-1-windhl@126.com
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1b0e46d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment