diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-11 13:23:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | 3f603cbbb8e175e545d6037a783e1ef82bab30f9 (patch) | |
tree | c3122b2be426be9bcfd3285bda86cb175fb9aaeb /arch/nios2 | |
parent | b06750501f5c0eef7fef094f13d2f2e313c60b79 (diff) | |
download | u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.zip u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.tar.gz u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.tar.bz2 |
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>
Diffstat (limited to 'arch/nios2')
-rw-r--r-- | arch/nios2/cpu/cpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index be7f99c..4f0f8fc 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -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 |