Skip to contentSkip to conversation

scsi: fcoe: Fix the return value in fcoe_interface_create() kernel-doc

PATCH New Karl Mehltretter 1 participant 1 message Sep 12

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fcoe: Fix the return value in fcoe_interface_create() kernel-doc

fcoe_interface_create() returns an ERR_PTR() on failure, but its kernel-doc still promises NULL on error. Its error paths switched to error pointers when FCoE module references were added for vports.

Update the return documentation to match the implementation.

Fixes 7287fb911409 ("[SCSI] fcoe: Fix module reference count for vports")
Assisted-by LLM
---
 drivers/scsi/fcoe/fcoe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fcoe/fcoe.c +1 -1
index 438ac7c3a9e3fd548a42779c4d753320ec79a854..2c86d8a06e410c99e02f5c7f2ab96a908dda199a 100644
@@ -375,7 +375,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
  * @netdev: The net device to create the FCoE interface on
  * @fip_mode: The mode to use for FIP
  *
- * Returns: pointer to a struct fcoe_interface or NULL on error
+ * Returns: pointer to a struct fcoe_interface or an ERR_PTR() on error
  */
 static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev,
 						    enum fip_mode fip_mode)
Signature · 1 line
2.39.5 (Apple Git-154)