mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
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: ac8498f0ce ("i2c: i2c-mux-gpmux: new driver")
Signed-off-by: Liang He <windhl@126.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
49897cfe62
commit
6435319c34
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user