dm: device: fail uclass_find_first_device() if list_empty
While uclass_find_device() fails with -ENODEV in case of list_empty strangely uclass_find_first_device() returns 0. Fix uclass_find_first_device() to also fail with -ENODEV instead. Signed-off-by:Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
Loading
Please register or sign in to comment