]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
scsi: return ENODEV in scsi_get_blk_by_uuid()
authorDavid Lechner <dlechner@baylibre.com>
Thu, 26 Mar 2026 22:59:24 +0000 (17:59 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 8 Apr 2026 17:07:07 +0000 (11:07 -0600)
Change scsi_get_blk_by_uuid() to return -ENODEV instead of -1 on error.
Other scsi_* functions return an error code rather than -1.

1 is EPERM, which doesn't make sense here. So we use ENODEV instead. The
only caller only checks for !success, so changing the value has no
effect on the caller.

Signed-off-by: David Lechner <dlechner@baylibre.com>
drivers/scsi/scsi-uclass.c

index 3eb6069649feea75a6a6e2681f07b3085c3aca3a..e7870d7f831926a60b566bb3e6c007835db86756 100644 (file)
@@ -50,7 +50,7 @@ int scsi_get_blk_by_uuid(const char *uuid,
                }
        }
 
-       return -1;
+       return -ENODEV;
 }
 
 int scsi_bus_reset(struct udevice *dev)