Skip to content

Commit 4a74f22

Browse files
Yuesong Ligregkh
authored andcommitted
driver:base:core: Adding a "Return:" line in comment for device_link_add()
The original document doesn't explain the return value directly which leads to confusing in error checking. You can find the reason here: Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Yuesong Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b45ed06 commit 4a74f22

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/base/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ postcore_initcall(devlink_class_init);
673673
* @supplier: Supplier end of the link.
674674
* @flags: Link flags.
675675
*
676+
* Return: On success, a device_link struct will be returned.
677+
* On error or invalid flag settings, NULL will be returned.
678+
*
676679
* The caller is responsible for the proper synchronization of the link creation
677680
* with runtime PM. First, setting the DL_FLAG_PM_RUNTIME flag will cause the
678681
* runtime PM framework to take the link into account. Second, if the

0 commit comments

Comments
 (0)