Skip to contentSkip to conversation

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

PATCH Applied Shawn Lin 2 participants 2 messages Feb 11 – Feb 22 Arm Rockchip

lore
Share & tools
lore

Shawn Lin

author
#0 lore raw

PATCH 1/1 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':

Fixes 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be

handled")

---

 drivers/soc/rockchip/grf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/rockchip/grf.c +1 -0
index 04937c4..b459607 100644
@@ -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);
 		}
 
Signature · 7 lines
2.7.4


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
maintainer Applied
#1 lore raw
Quoted 5 lines · Shawn Lin

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

Applied, thanks!

[1/1] soc: rockchip: grf: Add missing of_node_put() when returning

      commit: 24ed11ee5bacf9a9aca18fc6b47667c7f38d578b

Best regards,

Signature · 6 lines
Heiko Stuebner <[email protected]>

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip