]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: core: Correct the return value for uclass_find_first_device()
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:55:55 +0000 (08:55 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:38 +0000 (13:57 +0800)
commit4805a7af8ebd4c604e1e32355927ec5035685121
treefa15885bb421070d45c336c3a2e02a9744de4dfe
parentea14778d0680f8a3f262a06ceb52ea17deb6a104
dm: core: Correct the return value for uclass_find_first_device()

This function returns -ENODEV when there is no device. This is
inconsistent with other functions, such as uclass_find_next_device(),
which returns 0.

Update it and tidy up the incorrect '-1' values in the comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
drivers/core/uclass.c
include/dm/uclass-internal.h
test/dm/core.c