|
@@ -1502,9 +1502,10 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
|
|
host = aac->scsi_host_ptr;
|
|
host = aac->scsi_host_ptr;
|
|
scsi_block_requests(host);
|
|
scsi_block_requests(host);
|
|
aac_adapter_disable_int(aac);
|
|
aac_adapter_disable_int(aac);
|
|
- if (aac->thread->pid != current->pid) {
|
|
|
|
|
|
+ if (aac->thread && aac->thread->pid != current->pid) {
|
|
spin_unlock_irq(host->host_lock);
|
|
spin_unlock_irq(host->host_lock);
|
|
kthread_stop(aac->thread);
|
|
kthread_stop(aac->thread);
|
|
|
|
+ aac->thread = NULL;
|
|
jafo = 1;
|
|
jafo = 1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1591,6 +1592,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
|
|
aac->name);
|
|
aac->name);
|
|
if (IS_ERR(aac->thread)) {
|
|
if (IS_ERR(aac->thread)) {
|
|
retval = PTR_ERR(aac->thread);
|
|
retval = PTR_ERR(aac->thread);
|
|
|
|
+ aac->thread = NULL;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
}
|
|
}
|