Commit e0dc235a authored by Liang He's avatar Liang He Committed by Jialin Zhang
Browse files

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

stable inclusion
from stable-v5.10.146
commit aa11dae059a439af82bae541b134f8f53ac177b5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0VX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aa11dae059a439af82bae541b134f8f53ac177b5



--------------------------------

[ 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>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f9faf962
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment