diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-08-26 23:59:33 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-08-31 23:40:34 +0300 |
commit | bdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21 (patch) | |
tree | 55e1349545281cc42506557e303913a6aba76780 /drivers/i2c/muxes/i2c-arb-gpio-challenge.c | |
parent | 3fffd12839273429a185d68431f117f0a3654b07 (diff) | |
download | linux-bdbf4a29ee5bbe5b6743ba47bc7b10ec2cba8b21.tar.xz |
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-arb-gpio-challenge.c')
-rw-r--r-- | drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c index 71aac0911bf7..402e3a6c671a 100644 --- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c +++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c @@ -197,6 +197,7 @@ static int i2c_arbitrator_probe(struct platform_device *pdev) return -EINVAL; } arb->parent = of_get_i2c_adapter_by_node(parent_np); + of_node_put(parent_np); if (!arb->parent) { dev_err(dev, "Cannot find parent bus\n"); return -EPROBE_DEFER; |