]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/aacraid/linit.c
[SCSI] aacraid: fix potential panic in thread stop
[karo-tx-linux.git] / drivers / scsi / aacraid / linit.c
index 038980be763d18f75ef37902662ceb766b72a530..53061bceaad850d9ad81de84d63743675715b7d4 100644 (file)
@@ -950,7 +950,8 @@ static struct scsi_host_template aac_driver_template = {
 
 static void __aac_shutdown(struct aac_dev * aac)
 {
-       kthread_stop(aac->thread);
+       if (aac->aif_thread)
+               kthread_stop(aac->thread);
        aac_send_shutdown(aac);
        aac_adapter_disable_int(aac);
        free_irq(aac->pdev->irq, aac);