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/1d4c39e109bcf288d5900670e024a315.sboyd@kernel.org/ Signed-off-by: Yuesong Li <liyuesong@vivo.com> Link: https://lore.kernel.org/r/20240821040432.4049183-1-liyuesong@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b45ed06 commit 4a74f22

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)