From: Jackie Liu <liu.yun@linux.dev>
To: njavali@marvell.com
Cc: GR-QLogic-Storage-Upstream@marvell.com, linux-scsi@vger.kernel.org
Subject: [PATCH] scsi: qla2xxx: remove unnecessary NULL pointer check
Date: Fri, 26 May 2023 23:49:05 +0800 [thread overview]
Message-ID: <20230526154905.1419042-1-liu.yun@linux.dev> (raw)
From: Jackie Liu <liuyun01@kylinos.cn>
By the time we get here, fcport can't be NULL, because task_work is
can't be NULL, so this NULL check is not necessary, just cleanup.
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
drivers/scsi/qla2xxx/qla_target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 5258b07687a9..0ba089a753f2 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -684,7 +684,7 @@ void qla24xx_delete_sess_fn(struct work_struct *work)
fc_port_t *fcport = container_of(work, struct fc_port, del_work);
struct qla_hw_data *ha = NULL;
- if (!fcport || !fcport->vha || !fcport->vha->hw)
+ if (!fcport->vha || !fcport->vha->hw)
return;
ha = fcport->vha->hw;
--
2.25.1
reply other threads:[~2023-05-26 15:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230526154905.1419042-1-liu.yun@linux.dev \
--to=liu.yun@linux.dev \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=linux-scsi@vger.kernel.org \
--cc=njavali@marvell.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