]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic94xx/aic94xx_task.c
[SCSI] aic94xx: fix TMF ascb handling to prevent sequencer panic
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic94xx / aic94xx_task.c
index 965d4bb999d919f314ec83e810c8ad85b0f17075..008df9ab92a5f89b57c8f8cf36fa8ede7abc36d8 100644 (file)
@@ -343,11 +343,13 @@ Again:
        task->task_state_flags &= ~SAS_TASK_AT_INITIATOR;
        task->task_state_flags |= SAS_TASK_STATE_DONE;
        if (unlikely((task->task_state_flags & SAS_TASK_STATE_ABORTED))) {
+               struct completion *completion = ascb->completion;
                spin_unlock_irqrestore(&task->task_state_lock, flags);
                ASD_DPRINTK("task 0x%p done with opcode 0x%x resp 0x%x "
                            "stat 0x%x but aborted by upper layer!\n",
                            task, opcode, ts->resp, ts->stat);
-               complete(&ascb->completion);
+               if (completion)
+                       complete(completion);
        } else {
                spin_unlock_irqrestore(&task->task_state_lock, flags);
                task->lldd_task = NULL;