Commit 3f416f336e0d87519217777a460516c5cc1310e3
1 parent
4bad2e7374
Exists in
v2017.01-smarct4x
and in
33 other branches
dm: Add a return value comment to device_get_child()
At present this function does not specify its return value. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
include/dm/device.h
| ... | ... | @@ -318,6 +318,8 @@ |
| 318 | 318 | * @dev: Parent device to check |
| 319 | 319 | * @index: Child index |
| 320 | 320 | * @devp: Returns pointer to device |
| 321 | + * @return 0 if OK, -ENODEV if no such device, other error if the device fails | |
| 322 | + * to probe | |
| 321 | 323 | */ |
| 322 | 324 | int device_get_child(struct udevice *parent, int index, struct udevice **devp); |
| 323 | 325 | |
| ... | ... | @@ -413,7 +415,7 @@ |
| 413 | 415 | int device_find_first_child(struct udevice *parent, struct udevice **devp); |
| 414 | 416 | |
| 415 | 417 | /** |
| 416 | - * device_find_first_child() - Find the first child of a device | |
| 418 | + * device_find_next_child() - Find the next child of a device | |
| 417 | 419 | * |
| 418 | 420 | * @devp: Pointer to previous child device on entry. Returns pointer to next |
| 419 | 421 | * child device, or NULL if none |