scsi: qla2xxx: Simplify qla24xx_abort_sp_done()
authorBart Van Assche <bvanassche@acm.org>
Fri, 9 Aug 2019 03:01:39 +0000 (20:01 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Aug 2019 01:34:06 +0000 (21:34 -0400)
Instead of explicitly checking whether a timeout has occurred, ignore the
del_timer() return value.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c

index c24d7667d3c9e00a9614a6bbfcdd98d5ff832af4..cab5f2f90714440ce5d3eb06c15649049814773e 100644 (file)
@@ -122,13 +122,11 @@ static void qla24xx_abort_sp_done(void *ptr, int res)
        srb_t *sp = ptr;
        struct srb_iocb *abt = &sp->u.iocb_cmd;
 
-       if ((res == QLA_OS_TIMER_EXPIRED) ||
-           del_timer(&sp->u.iocb_cmd.timer)) {
-               if (sp->flags & SRB_WAKEUP_ON_COMP)
-                       complete(&abt->u.abt.comp);
-               else
-                       sp->free(sp);
-       }
+       del_timer(&sp->u.iocb_cmd.timer);
+       if (sp->flags & SRB_WAKEUP_ON_COMP)
+               complete(&abt->u.abt.comp);
+       else
+               sp->free(sp);
 }
 
 static int qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)