1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2015-07-06 12:54:33 -06:00
parent 8e6cc46178
commit fb8a5ffc77
2 changed files with 4 additions and 3 deletions

View File

@@ -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);