[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251113125350.39950-1-Pavel.Zhigulin@kaspersky.com>
Date: Thu, 13 Nov 2025 15:53:49 +0300
From: Pavel Zhigulin <Pavel.Zhigulin@...persky.com>
To: Saurav Kashyap <skashyap@...vell.com>
CC: Pavel Zhigulin <Pavel.Zhigulin@...persky.com>, Javed Hasan
<jhasan@...vell.com>, <GR-QLogic-Storage-Upstream@...vell.com>, "James E.J.
Bottomley" <James.Bottomley@...senPartnership.com>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Arun Easi <arun.easi@...ium.com>, Nilesh Javali
<nilesh.javali@...ium.com>, "Dupuis, Chad" <chad.dupuis@...ium.com>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<lvc-project@...uxtesting.org>
Subject: [PATCH] scsi: qedf: remove unreachable NULL check in qedf_flush_active_ios()
qedf_flush_active_ios() iterates over the statically allocated
cmd_mgr->cmds[] array. Each element in this array is always valid, so
the check:
if (!io_req)
can never be true. This condition is unreachable and redundant, and it
causes dead code that may confuse analysis tools.
Remove the redundant NULL check
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Pavel Zhigulin <Pavel.Zhigulin@...persky.com>
---
drivers/scsi/qedf/qedf_io.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index fcfc3bed02c6..e926034c260f 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -1649,8 +1649,6 @@ void qedf_flush_active_ios(struct qedf_rport *fcport, u64 lun)
for (i = 0; i < FCOE_PARAMS_NUM_TASKS; i++) {
io_req = &cmd_mgr->cmds[i];
- if (!io_req)
- continue;
if (!io_req->fcport)
continue;
--
2.43.0
Powered by blists - more mailing lists