dm: treewide: Use uclass_next_device_err when accessing second device
authorMichal Suchanek <msuchanek@suse.de>
Wed, 12 Oct 2022 19:58:00 +0000 (21:58 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Oct 2022 03:17:12 +0000 (21:17 -0600)
There are a couple users of uclass_next_device return value that get the
first device by other means and use uclass_next_device assuming the
following device in the uclass is related to the first one.

Use uclass_next_device_err because the return value from
uclass_next_device will be removed in a later patch.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-k3/j721s2_init.c
board/atmel/common/mac_eeprom.c

index 12da8136f9e1450d4809506b4570ab90bca85803..dd0c7ba18f023951c5ae98a1e465a7621e885c4e 100644 (file)
@@ -164,7 +164,7 @@ void board_init_f(ulong dummy)
                if (ret)
                        panic("DRAM 0 init failed: %d\n", ret);
 
-               ret = uclass_next_device(&dev);
+               ret = uclass_next_device_err(&dev);
                if (ret)
                        panic("DRAM 1 init failed: %d\n", ret);
        }
index a723ba723c9d31e8b02fc3392727086a32fdc96c..4606008c697f1fb16df501ea84116f9a91c4c30f 100644 (file)
@@ -56,7 +56,7 @@ int at91_set_eth1addr(int offset)
                return ret;
 
        /* attempt to obtain a second eeprom device */
-       ret = uclass_next_device(&dev);
+       ret = uclass_next_device_err(&dev);
        if (ret)
                return ret;