summaryrefslogtreecommitdiff
path: root/drivers/i2c/muxes/i2c-mux-gpio.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2015-08-26 23:59:33 +0300
committerWolfram Sang <wsa@the-dreams.de>2015-08-31 22:40:34 +0200
commitbdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21 (patch)
tree55e1349545281cc42506557e303913a6aba76780 /drivers/i2c/muxes/i2c-mux-gpio.c
parent3fffd12839273429a185d68431f117f0a3654b07 (diff)
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-gpio.c')
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 70db99264339..b8e11c16d98c 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -76,6 +76,7 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
return -ENODEV;
}
adapter = of_find_i2c_adapter_by_node(adapter_np);
+ of_node_put(adapter_np);
if (!adapter)
return -EPROBE_DEFER;