Commit 24ed11ee authored by Shawn Lin's avatar Shawn Lin Committed by Heiko Stuebner
Browse files

soc: rockchip: grf: Add missing of_node_put() when returning



Fix the smatch checking:
drivers/soc/rockchip/grf.c:249 rockchip_grf_init()
warn: inconsistent refcounting 'np->kobj.kref.refcount.refs.counter':

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: 75fb63ae ("soc: rockchip: grf: Support multiple grf to be handled")
Closes: https://lore.kernel.org/all/aYXvgTcUJWQL2can@stanley.mountain/


Signed-off-by: default avatarShawn 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: default avatarHeiko Stuebner <heiko@sntech.de>
parent 6de23f81
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ static int __init rockchip_grf_init(void)
		grf = syscon_node_to_regmap(np);
		if (IS_ERR(grf)) {
			pr_err("%s: could not get grf syscon\n", __func__);
			of_node_put(np);
			return PTR_ERR(grf);
		}