lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240821040432.4049183-1-liyuesong@vivo.com>
Date: Wed, 21 Aug 2024 12:04:32 +0800
From: Yuesong Li <liyuesong@...o.com>
To: gregkh@...uxfoundation.org
Cc: rafael@...nel.org,
	linux-kernel@...r.kernel.org,
	sboyd@...nel.org,
	opensource.kernel@...o.com,
	Yuesong Li <liyuesong@...o.com>
Subject: [PATCH v1] 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@...o.com>
---
 drivers/base/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6d3897492285..97d5005b2210 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -682,6 +682,9 @@ postcore_initcall(devlink_class_init);
  * @supplier: Supplier end of the link.
  * @flags: Link flags.
  *
+ * Return: On success, a device_link struct will be returned.
+ *         On error or invalid flag settings, NULL will be returned.
+ *
  * The caller is responsible for the proper synchronization of the link creation
  * with runtime PM.  First, setting the DL_FLAG_PM_RUNTIME flag will cause the
  * runtime PM framework to take the link into account.  Second, if the
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ