]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: core: Correct bug introduced in uclass_first/next_device()
authorSimon Glass <sjg@chromium.org>
Sat, 25 Apr 2015 04:33:07 +0000 (22:33 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:31:33 +0000 (22:31 +0200)
commit459859f2fd9217416e1cbd64054075e8b6c661d5
tree3ffa21c7b54a8be927835c9b9dca6321ff260210
parentfbb63e0392f7ef3e25a3b1d1ba6801e55ea35f01
dm: core: Correct bug introduced in uclass_first/next_device()

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@chromium.org>
drivers/core/uclass.c