Re: [U-Boot] [PATCH 1/3] dm: device: fail uclass_find_first_device() if list_empty

2019-01-25 Thread Marcel Ziswiler
Hi Simon On Fri, 2019-01-25 at 09:18 +1300, Simon Glass wrote: > Hi Marcel, > > On Fri, 25 Jan 2019 at 03:30, Marcel Ziswiler > wrote: > > From: Marcel Ziswiler > > > > While uclass_find_device() fails with -ENODEV in case of list_empty > > strangely uclass_find_first_device() returns 0. > >

Re: [U-Boot] [PATCH 1/3] dm: device: fail uclass_find_first_device() if list_empty

2019-01-24 Thread Simon Glass
Hi Marcel, On Fri, 25 Jan 2019 at 03:30, Marcel Ziswiler wrote: > > From: Marcel Ziswiler > > 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. The fix sees

[U-Boot] [PATCH 1/3] dm: device: fail uclass_find_first_device() if list_empty

2019-01-24 Thread Marcel Ziswiler
From: Marcel Ziswiler 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 --- drivers/core/uclass.c | 2 +- 1 file changed, 1