aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiao Chen <[email protected]>2024-09-21 06:29:56 +0000
committerMartin K. Petersen <[email protected]>2024-10-03 21:37:35 -0400
commitab19e3154cc12fdf6c39b6e0a2ed518e45d9f876 (patch)
tree3ba622ad173bedb44423a7f3e88699ea07fe9924
parentb1ab5e28c8378d69a8152e24263eb1a8bc79953b (diff)
scsi: qedf: Remove dead code
If container_of() is used correctly, its result is never NULL. Remove the code that depends on container_of() returning a NULL pointer. Signed-off-by: Liao Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/qedf/qedf_main.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index cf13148ba281..df756f3eef3e 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -4018,11 +4018,6 @@ void qedf_stag_change_work(struct work_struct *work)
struct qedf_ctx *qedf =
container_of(work, struct qedf_ctx, stag_work.work);
- if (!qedf) {
- QEDF_ERR(&qedf->dbg_ctx, "qedf is NULL");
- return;
- }
-
if (test_bit(QEDF_IN_RECOVERY, &qedf->flags)) {
QEDF_ERR(&qedf->dbg_ctx,
"Already is in recovery, hence not calling software context reset.\n");