Doing this allows drivers to distinguish between a real error case (if
there was an error when we tried to resolve the GPIO) and when the optional
GPIO line was not available.

Signed-off-by: Mika Westerberg <[email protected]>
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 8506e4ce41f7..716ee9843110 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -307,7 +307,7 @@ struct gpio_desc *acpi_get_gpiod_by_index(struct device 
*dev, int index,
        if (lookup.desc && info)
                *info = lookup.info;
 
-       return lookup.desc ? lookup.desc : ERR_PTR(-ENODEV);
+       return lookup.desc ? lookup.desc : ERR_PTR(-ENOENT);
 }
 
 void acpi_gpiochip_add(struct gpio_chip *chip)
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to