diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/uclass.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 08d9ed82de..a591e22403 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -799,20 +799,18 @@ int uclass_pre_remove_device(struct udevice *dev) int uclass_probe_all(enum uclass_id id) { struct udevice *dev; - int ret; + int ret, err; - ret = uclass_first_device(id, &dev); - if (ret || !dev) - return ret; + err = uclass_first_device_check(id, &dev); /* Scanning uclass to probe all devices */ while (dev) { - ret = uclass_next_device(&dev); + ret = uclass_next_device_check(&dev); if (ret) - return ret; + err = ret; } - return 0; + return err; } int uclass_id_count(enum uclass_id id) |