Skip to content

Commit bbc4e23

Browse files
committed
scsi: qedf: Remove dead code
JIRA: https://issues.redhat.com/browse/RHEL-72637 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 <liaochen4@huawei.com> Link: https://lore.kernel.org/r/20240921062956.2027563-1-liaochen4@huawei.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit ab19e31) Signed-off-by: John Meneghini <jmeneghi@redhat.com>
1 parent d19c518 commit bbc4e23

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/scsi/qedf/qedf_main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,11 +4021,6 @@ void qedf_stag_change_work(struct work_struct *work)
40214021
struct qedf_ctx *qedf =
40224022
container_of(work, struct qedf_ctx, stag_work.work);
40234023

4024-
if (!qedf) {
4025-
QEDF_ERR(&qedf->dbg_ctx, "qedf is NULL");
4026-
return;
4027-
}
4028-
40294024
if (test_bit(QEDF_IN_RECOVERY, &qedf->flags)) {
40304025
QEDF_ERR(&qedf->dbg_ctx,
40314026
"Already is in recovery, hence not calling software context reset.\n");

0 commit comments

Comments
 (0)