summaryrefslogtreecommitdiff
path: root/include/dm/uclass-internal.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:55:55 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:38 +0800
commit4805a7af8ebd4c604e1e32355927ec5035685121 (patch)
treefa15885bb421070d45c336c3a2e02a9744de4dfe /include/dm/uclass-internal.h
parentea14778d0680f8a3f262a06ceb52ea17deb6a104 (diff)
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>
Diffstat (limited to 'include/dm/uclass-internal.h')
-rw-r--r--include/dm/uclass-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index 6977995246..6e3f15c2b0 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -69,7 +69,7 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
* The device is not prepared for use - this is an internal function.
* The function uclass_get_device_tail() can be used to probe the device.
*
- * @return 0 if OK (found or not found), -1 on error
+ * @return 0 if OK (found or not found), -ve on error
*/
int uclass_find_first_device(enum uclass_id id, struct udevice **devp);
@@ -81,7 +81,7 @@ int uclass_find_first_device(enum uclass_id id, struct udevice **devp);
* The device is not prepared for use - this is an internal function.
* The function uclass_get_device_tail() can be used to probe the device.
*
- * @return 0 if OK (found or not found), -1 on error
+ * @return 0 if OK (found or not found), -ve on error
*/
int uclass_find_next_device(struct udevice **devp);