From: David Lechner Date: Thu, 26 Mar 2026 22:59:24 +0000 (-0500) Subject: scsi: return ENODEV in scsi_get_blk_by_uuid() X-Git-Tag: v2026.07-rc1~63^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5d8ad260bb7de1729a6454e8b95a83e629dff7a;p=thirdparty%2Fu-boot.git scsi: return ENODEV in scsi_get_blk_by_uuid() 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 --- diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c index 3eb6069649f..e7870d7f831 100644 --- a/drivers/scsi/scsi-uclass.c +++ b/drivers/scsi/scsi-uclass.c @@ -50,7 +50,7 @@ int scsi_get_blk_by_uuid(const char *uuid, } } - return -1; + return -ENODEV; } int scsi_bus_reset(struct udevice *dev)