Skip to contentSkip to conversation

scsi: lpfc: return NULL rather than a plain 0 integer

PATCH Applied Colin King 2 participants 3 messages Sep 25, 2021 – Oct 5, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 scsi: lpfc: return NULL rather than a plain 0 integer

From: Colin Ian King <[email protected]>

Function lpfc_sli4_perform_vport_cvl returns a pointer to struct lpfc_nodelist so returning a plain 0 integer isn't good practice. Fix this by returning a NULL instead.

---
 drivers/scsi/lpfc/lpfc_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_init.c +1 -1
index 8d5537ec0f30..6dc0be8bc177 100644
@@ -6564,7 +6564,7 @@ lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport)
 		/* Cannot find existing Fabric ndlp, so allocate a new one */
 		ndlp = lpfc_nlp_init(vport, Fabric_DID);
 		if (!ndlp)
-			return 0;
+			return NULL;
 		/* Set the node type */
 		ndlp->nlp_type |= NLP_FABRIC;
 		/* Put ndlp onto node list */
Signature · 1 line
2.32.0
#1 lore raw

Colin,

Quoted 3 lines

Function lpfc_sli4_perform_vport_cvl returns a pointer to struct lpfc_nodelist so returning a plain 0 integer isn't good practice. Fix this by returning a NULL instead.

Applied to 5.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Colin King
Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

Function lpfc_sli4_perform_vport_cvl returns a pointer to struct lpfc_nodelist so returning a plain 0 integer isn't good practice. Fix this by returning a NULL instead.

[...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: lpfc: return NULL rather than a plain 0 integer

      https://git.kernel.org/mkp/scsi/c/5860d9fb5622
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering