diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-08-26 22:59:33 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-08-31 22:40:34 +0200 |
commit | bdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21 (patch) | |
tree | 55e1349545281cc42506557e303913a6aba76780 /drivers/i2c/muxes/i2c-mux-pinctrl.c | |
parent | i2c: allow specifying separate wakeup interrupt in device tree (diff) | |
download | linux-bdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21.tar.xz linux-bdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21.zip |
i2c: muxes: fix leaked i2c adapter device node references
Every call of of_parse_phandle() increments user count of found device
node, if OF_DYNAMIC is enabled.
The change fixes all similar addressed cases in drivers/i2c.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/muxes/i2c-mux-pinctrl.c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pinctrl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index b48378c4b40d..b5a982ba8898 100644 --- a/drivers/i2c/muxes/i2c-mux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c @@ -111,6 +111,7 @@ static int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux, return -ENODEV; } adapter = of_find_i2c_adapter_by_node(adapter_np); + of_node_put(adapter_np); if (!adapter) { dev_err(mux->dev, "Cannot find parent bus\n"); return -EPROBE_DEFER; |