summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Romieu <romieu@fr.zoreil.com>2004-09-30 15:37:25 -0400
committerJeff Garzik <jgarzik@pobox.com>2004-09-30 15:37:25 -0400
commit6f3dd2e8c68b2089c856f9f0f70fd0dc19d4e328 (patch)
tree4bff1bc13e7cf98f7cde3c98e7bca6f6d00d1c2f
parent067dfdd61a153765d7fc4e412c09a88dbbd49e7f (diff)
[PATCH] sata_nv: enable hotplug event on successfull init only
Wait for successfull completion of nv_init_one() before hotplug events are enabled. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
-rw-r--r--drivers/scsi/sata_nv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index aef957b523f9..40666718840e 100644
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -373,14 +373,14 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_master(pdev);
- // Enable hotplug event interrupts.
- if (host->host_desc->enable_hotplug)
- host->host_desc->enable_hotplug(probe_ent);
-
rc = ata_device_add(probe_ent);
if (rc != NV_PORTS)
goto err_out_iounmap;
+ // Enable hotplug event interrupts.
+ if (host->host_desc->enable_hotplug)
+ host->host_desc->enable_hotplug(probe_ent);
+
kfree(probe_ent);
return 0;