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>
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 @@
 	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;