diff mbox series

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

Message ID 20210925224113.183040-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show
Series scsi: lpfc: return NULL rather than a plain 0 integer | expand

Commit Message

Colin King Sept. 25, 2021, 10:41 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Sept. 29, 2021, 3:21 a.m. UTC | #1
Colin,

> 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!
Martin K. Petersen Oct. 5, 2021, 4:34 a.m. UTC | #2
On Sat, 25 Sep 2021 23:41:13 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 8d5537ec0f30..6dc0be8bc177 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -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 */