Commit 821f9c62 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by zhaoxiaoqiang11
Browse files

gpio: sifive: Fix refcount leak in sifive_gpio_probe

stable inclusion
from stable-v5.10.163
commit f4a2ad1002006548e235255c65a4f1d07312be9d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7PJ9N

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



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

[ Upstream commit 694175cd ]

of_irq_find_parent() returns a node pointer with refcount incremented,
We should use of_node_put() on it when not needed anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 96868dce ("gpio/sifive: Add GPIO driver for SiFive SoCs")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
parent c3d9006d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment