[U-Boot] [PATCH] dm: core: Correct bug introduced in uclass_first/next_device()

Simon Glass sjg at chromium.org
Tue Apr 28 14:42:10 CEST 2015


Hi,

On 24 April 2015 at 22:33, Simon Glass <sjg at chromium.org> wrote:
> These functions now rely on uclass_find_first/next_device() and assume that
> they will either return failure (-ve error code) or a device. In fact,
> coming to the end of a list is not considered failure and they return 0
> in that case.
>
> The logic to deal with this was replaced in commit acb9ca2a with just using
> uclass_get_device_tail(). Add back the missing logic. This bug was
> caught by unit tests but since they were broken for other reasons at the
> time, this was not noticed.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/core/uclass.c | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to u-boot-dm.

I'll pull this in soon since it does break a number of things.

Regards,
Simon


More information about the U-Boot mailing list