diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 44ae98a9269..4926a50da85 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -784,7 +784,7 @@ static int bootdev_hunt_drv(struct bootdev_hunter *info, uint seq, bool show) if (info->hunt) { ret = info->hunt(info, show); log_debug(" - hunt result %d\n", ret); - if (ret) + if (ret && ret != -ENOENT) return ret; } std->hunters_used |= BIT(seq); diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c index dcb5fcf476b..64fc078bada 100644 --- a/drivers/ata/sata.c +++ b/drivers/ata/sata.c @@ -65,7 +65,7 @@ int sata_rescan(bool verbose) ret = uclass_find_first_device(UCLASS_AHCI, &dev); if (ret || !dev) { printf("Cannot find SATA device (err=%d)\n", ret); - return -ENOSYS; + return -ENOENT; } ret = device_remove(dev, DM_REMOVE_NORMAL); diff --git a/include/bootdev.h b/include/bootdev.h index b079a91b5b7..35fa25aff1d 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -65,7 +65,7 @@ struct bootdev_hunter; * * @info: Info structure describing this hunter * @show: true to show information from the hunter - * Returns: 0 if OK, -ve on error + * Returns: 0 if OK, -ENOENT on device not found, otherwise -ve on error */ typedef int (*bootdev_hunter_func)(struct bootdev_hunter *info, bool show);