]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/nios2/cpu/cpu.c
dm: Use uclass_first_device_err() where it is useful
[people/ms/u-boot.git] / arch / nios2 / cpu / cpu.c
index be7f99c1de4fb7d6e29f9a8bf3fe4336f50681ea..4f0f8fc5f8bb7c103776c89459feeccf390945c4 100644 (file)
@@ -63,11 +63,9 @@ int arch_cpu_init_dm(void)
        struct udevice *dev;
        int ret;
 
-       ret = uclass_first_device(UCLASS_CPU, &dev);
+       ret = uclass_first_device_err(UCLASS_CPU, &dev);
        if (ret)
                return ret;
-       if (!dev)
-               return -ENODEV;
 
        gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 #ifndef CONFIG_ROM_STUBS