Commit 6f3dd2e8 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[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: default avatarFrancois Romieu <romieu@fr.zoreil.com>
parent 067dfdd6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment