Skip to contentSkip to conversation

scsi: qla2xxx: remove unnecessary NULL pointer check

PATCH New Jackie Liu 1 participant 1 message May 26, 2023

Subsystems (2)
lore
Share & tools
lore

Jackie Liu

author
#0 lore raw

PATCH 1/1 scsi: qla2xxx: remove unnecessary NULL pointer check

From: Jackie Liu <[email protected]>

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.

---
 drivers/scsi/qla2xxx/qla_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_target.c +1 -1
index 5258b07687a9..0ba089a753f2 100644
@@ -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;
Signature · 1 line
2.25.1