* [PATCH] scsi: qla2xxx: remove unnecessary NULL pointer check
@ 2023-05-26 15:49 Jackie Liu
0 siblings, 0 replies; only message in thread
From: Jackie Liu @ 2023-05-26 15:49 UTC (permalink / raw)
To: njavali; +Cc: GR-QLogic-Storage-Upstream, linux-scsi
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-26 15:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-26 15:49 [PATCH] scsi: qla2xxx: remove unnecessary NULL pointer check Jackie Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox