Commit 6435319c authored by Liang He's avatar Liang He Committed by Wolfram Sang
Browse files

i2c: mux-gpmux: Add of_node_put() when breaking out of loop



In i2c_mux_probe(), we should call of_node_put() when breaking out
of for_each_child_of_node() which will automatically increase and
decrease the refcount.

Fixes: ac8498f0 ("i2c: i2c-mux-gpmux: new driver")
Signed-off-by: default avatarLiang He <windhl@126.com>
Acked-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 49897cfe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ static int i2c_mux_probe(struct platform_device *pdev)
	return 0;

err_children:
	of_node_put(child);
	i2c_mux_del_adapters(muxc);
err_parent:
	i2c_put_adapter(parent);