mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 75fb63ae03 ("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>
This commit is contained in:
committed by
Heiko Stuebner
parent
6de23f81a5
commit
24ed11ee5b
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user