diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-06-19 23:49:57 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-06-23 11:07:13 +0200 |
commit | dd3b204af11b50be6dc77e18b88b3c646bba354c (patch) | |
tree | bf549e4a9d6838e991cbf09ee51be205ea7df268 /drivers/gpio | |
parent | 771d899adde8e07969bd430932cca1fc3de0000e (diff) | |
download | op-kernel-dev-dd3b204af11b50be6dc77e18b88b3c646bba354c.zip op-kernel-dev-dd3b204af11b50be6dc77e18b88b3c646bba354c.tar.gz |
gpio: intel-mid: switch to devm_gpiochip_add_data()
The error handling is not correct since the commit 3f7dbfd8eea9 ("gpio:
intel-mid: switch to using gpiolib irqchip helpers"). Switch to devres API to
fix the potential resource leak.
Fixes: commit 3f7dbfd8eea9 ("gpio: intel-mid: switch to using gpiolib irqchip helpers")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-intel-mid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c index cdaba13..a99cf4b 100644 --- a/drivers/gpio/gpio-intel-mid.c +++ b/drivers/gpio/gpio-intel-mid.c @@ -401,7 +401,7 @@ static int intel_gpio_probe(struct pci_dev *pdev, spin_lock_init(&priv->lock); pci_set_drvdata(pdev, priv); - retval = gpiochip_add_data(&priv->chip, priv); + retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv); if (retval) { dev_err(&pdev->dev, "gpiochip_add error %d\n", retval); return retval; |