You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
gpio: intel-mid: switch to devm_gpiochip_add_data()
The error handling is not correct since the commit3f7dbfd8ee("gpio: intel-mid: switch to using gpiolib irqchip helpers"). Switch to devres API to fix the potential resource leak. Fixes: commit3f7dbfd8ee("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>
This commit is contained in:
committed by
Linus Walleij
parent
771d899add
commit
dd3b204af1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user