summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-11 13:23:26 -0700
committerSimon Glass <sjg@chromium.org>2016-03-14 15:34:50 -0600
commit3f603cbbb8e175e545d6037a783e1ef82bab30f9 (patch)
treec3122b2be426be9bcfd3285bda86cb175fb9aaeb /drivers/misc
parentb06750501f5c0eef7fef094f13d2f2e313c60b79 (diff)
downloadu-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 'drivers/misc')
-rw-r--r--drivers/misc/altera_sysid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index 2d0fa2a..ed6d462 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -32,11 +32,9 @@ void display_sysid(void)
int ret;
/* the first misc device will be used */
- ret = uclass_first_device(UCLASS_MISC, &dev);
+ ret = uclass_first_device_err(UCLASS_MISC, &dev);
if (ret)
return;
- if (!dev)
- return;
ret = misc_read(dev, 0, &sysid, sizeof(sysid));
if (ret)
return;