
31 Jan
2019
31 Jan
'19
11:04 a.m.
On Fri, 25 Jan 2019 at 05:40, Marcel Ziswiler marcel@ziswiler.com wrote:
From: Marcel Ziswiler marcel.ziswiler@toradex.com
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
Changes in v2:
- Update dm_test_uclass_devices_find() to test this behaviour as suggested by Simon.
drivers/core/uclass.c | 2 +- test/dm/core.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org