From 7c84319af9c76084f50f3f2b97545bfa05f3971d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 17 Sep 2017 16:54:53 -0600 Subject: dm: gpio: Correct use of -ENODEV in drivers In U-Boot -ENODEV means that there is no device. When there is a problem with the device, drivers should return an error like -ENXIO or -EREMOTEIO. When the device tree properties cannot be read correct , they should return -EINVAL. Update various GPIO drivers to follow this rule, to help with consistency for future driver writers. Signed-off-by: Simon Glass Reported-by: Adam Ford --- drivers/gpio/omap_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio/omap_gpio.c') diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 1ab12f3f1e..7243100219 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -307,7 +307,7 @@ static int omap_gpio_bind(struct udevice *dev) base_addr = devfdt_get_addr(dev); if (base_addr == FDT_ADDR_T_NONE) - return -ENODEV; + return -EINVAL; /* * TODO: -- cgit v1.2.3