From fb8a5ffc77597a99678dbd5077f29ec9df54bdbe Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 6 Jul 2015 12:54:33 -0600 Subject: led: Return -ENODEV if the LED device cannot be found We normally use -ENODEV for a missing device, rather than -ENOENT. The latter is reserved for when we have a device but cannot find something within it. Also avoid looking at the root LED device since it is only a container. Signed-off-by: Simon Glass --- include/led.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/led.h') diff --git a/include/led.h b/include/led.h index 8925d75bcf..b929d0ca3c 100644 --- a/include/led.h +++ b/include/led.h @@ -35,7 +35,7 @@ struct led_ops { * * @label: LED label to look up * @devp: Returns the associated device, if found - * @return 0 if found, -ve on error + * @return 0 if found, -ENODEV if not found, other -ve on error */ int led_get_by_label(const char *label, struct udevice **devp); -- cgit v1.2.3