Browse Source

mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()

It is usually better to pass actual error code from a function call than
mangling it to another.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Jarkko Nikula 10 years ago
parent
commit
ad7b5a175c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mfd/intel_soc_pmic_core.c

+ 1 - 1
drivers/mfd/intel_soc_pmic_core.c

@@ -33,7 +33,7 @@ static int intel_soc_pmic_find_gpio_irq(struct device *dev)
 
 
 	desc = devm_gpiod_get_index(dev, "intel_soc_pmic", 0);
 	desc = devm_gpiod_get_index(dev, "intel_soc_pmic", 0);
 	if (IS_ERR(desc))
 	if (IS_ERR(desc))
-		return -ENOENT;
+		return PTR_ERR(desc);
 
 
 	irq = gpiod_to_irq(desc);
 	irq = gpiod_to_irq(desc);
 	if (irq < 0)
 	if (irq < 0)