mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
i2c: mux-gpmux: Add of_node_put() when breaking out of loop
[ Upstream commit6435319c34
] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
dc3dcee0d5
commit
ebd634be86
1 changed files with 1 additions and 0 deletions
|
@ -141,6 +141,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 a new issue