Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a00580c2 authored by Mika Westerberg's avatar Mika Westerberg Committed by Linus Walleij
Browse files

gpio / ACPI: return -ENOENT when no mapping exists



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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent fcffa97f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -307,6 +307,6 @@ 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);
}
EXPORT_SYMBOL_GPL(acpi_get_gpiod_by_index);