Skip to content
/ linux Public

Commit 2095513

Browse files
shawn1221gregkh
authored andcommitted
soc: rockchip: grf: Add missing of_node_put() when returning
[ Upstream commit 24ed11e ] Fix the smatch checking: drivers/soc/rockchip/grf.c:249 rockchip_grf_init() warn: inconsistent refcounting 'np->kobj.kref.refcount.refs.counter': Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: 75fb63a ("soc: rockchip: grf: Support multiple grf to be handled") Closes: https://lore.kernel.org/all/aYXvgTcUJWQL2can@stanley.mountain/ Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Link: https://patch.msgid.link/1770814957-17762-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4408419 commit 2095513

File tree

1 file changed

+1
-0
lines changed
  • drivers/soc/rockchip

1 file changed

+1
-0
lines changed

drivers/soc/rockchip/grf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ static int __init rockchip_grf_init(void)
217217
grf = syscon_node_to_regmap(np);
218218
if (IS_ERR(grf)) {
219219
pr_err("%s: could not get grf syscon\n", __func__);
220+
of_node_put(np);
220221
return PTR_ERR(grf);
221222
}
222223

0 commit comments

Comments
 (0)