aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-pnp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-pnp.c')
-rw-r--r--drivers/ide/ide-pnp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index 4458ca61897a..bac9b392b689 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -31,6 +31,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
31{ 31{
32 struct ide_host *host; 32 struct ide_host *host;
33 unsigned long base, ctl; 33 unsigned long base, ctl;
34 int rc;
34 hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; 35 hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
35 36
36 printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n"); 37 printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n");
@@ -59,19 +60,18 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
59 hw.irq = pnp_irq(dev, 0); 60 hw.irq = pnp_irq(dev, 0);
60 hw.chipset = ide_generic; 61 hw.chipset = ide_generic;
61 62
62 host = ide_host_alloc(NULL, hws); 63 rc = ide_host_add(NULL, hws, &host);
63 if (host) { 64 if (rc)
64 pnp_set_drvdata(dev, host); 65 goto out;
65 66
66 ide_host_register(host, NULL, hws); 67 pnp_set_drvdata(dev, host);
67
68 return 0;
69 }
70 68
69 return 0;
70out:
71 release_region(ctl, 1); 71 release_region(ctl, 1);
72 release_region(base, 8); 72 release_region(base, 8);
73 73
74 return -1; 74 return rc;
75} 75}
76 76
77static void idepnp_remove(struct pnp_dev *dev) 77static void idepnp_remove(struct pnp_dev *dev)