dm: Use uclass_first_device_err() where it is useful

Use this new function in places where it simplifies the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2016-02-11 13:23:26 -07:00
parent b06750501f
commit 3f603cbbb8
17 changed files with 30 additions and 54 deletions
+1 -3
View 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