dm: treewide: Use uclass_first_device_err when accessing one device
[platform/kernel/u-boot.git] / test / dm / virtio_device.c
index d0195e6..b5c4523 100644 (file)
@@ -22,7 +22,7 @@ static int dm_test_virtio_base(struct unit_test_state *uts)
        u8 status;
 
        /* check probe success */
-       ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus));
+       ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
        ut_assertnonnull(bus);
 
        /* check the child virtio-rng device is bound */
@@ -60,7 +60,7 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts)
        struct virtqueue *vqs[2];
 
        /* check probe success */
-       ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus));
+       ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
        ut_assertnonnull(bus);
 
        /* check the child virtio-rng device is bound */
@@ -102,7 +102,7 @@ static int dm_test_virtio_remove(struct unit_test_state *uts)
        struct udevice *bus, *dev;
 
        /* check probe success */
-       ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus));
+       ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
        ut_assertnonnull(bus);
 
        /* check the child virtio-rng device is bound */
@@ -134,7 +134,7 @@ static int dm_test_virtio_ring(struct unit_test_state *uts)
        u8 buffer[2][32];
 
        /* check probe success */
-       ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus));
+       ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
        ut_assertnonnull(bus);
 
        /* check the child virtio-blk device is bound */