mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dipendra Khadka <kdipendra88@gmail.com>
To: james.smart@broadcom.com, dick.kennedy@broadcom.com,
	martin.petersen@oracle.com
Cc: Dipendra Khadka <kdipendra88@gmail.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: drivers: scsi: lpfc: Fix warning: Using plain integer as NULL pointer in lpfc_init.c
Date: Sat, 10 Aug 2024 11:23:05 +0000	[thread overview]
Message-ID: <20240810112307.175333-1-kdipendra88@gmail.com> (raw)

sparse reported following warnings:

'''
drivers/scsi/lpfc/lpfc_init.c:5517:32: warning: Using plain integer as NULL pointer
drivers/scsi/lpfc/lpfc_init.c:5526:32: warning: Using plain integer as NULL pointer
'''
This patch chanes integer 0 to NULL.

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 69a5249e007a..7f012ba3edb2 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5514,7 +5514,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 */
@@ -5523,7 +5523,7 @@ lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport)
 		/* re-setup ndlp without removing from node list */
 		ndlp = lpfc_enable_node(vport, ndlp, NLP_STE_UNUSED_NODE);
 		if (!ndlp)
-			return 0;
+			return NULL;
 	}
 	if ((phba->pport->port_state < LPFC_FLOGI) &&
 		(phba->pport->port_state != LPFC_VPORT_FAILED))
-- 
2.43.0


             reply	other threads:[~2024-08-10 11:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-10 11:23 Dipendra Khadka [this message]
2024-08-12 16:24 ` Justin Tee
2024-08-15 19:02   ` Dipendra Khadka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240810112307.175333-1-kdipendra88@gmail.com \
    --to=kdipendra88@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®