diff options
author | Liang He <windhl@126.com> | 2022-07-22 04:24:01 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-07-27 00:10:59 +0300 |
commit | 6435319c34704994e19b0767f6a4e6f37439867b (patch) | |
tree | a79077036186c11085f385e4efcb3747633194e2 /drivers/i2c | |
parent | 49897cfe620dc7445d18d6ae6e1da9c8d4c02c94 (diff) | |
download | linux-6435319c34704994e19b0767f6a4e6f37439867b.tar.xz |
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: ac8498f0ce53 ("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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-gpmux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-gpmux.c b/drivers/i2c/muxes/i2c-mux-gpmux.c index d3acd8d66c32..33024acaac02 100644 --- a/drivers/i2c/muxes/i2c-mux-gpmux.c +++ b/drivers/i2c/muxes/i2c-mux-gpmux.c @@ -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); |