diff options
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 19ec421f7b9f..44268504ae43 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -260,6 +260,11 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
260 | { | 260 | { |
261 | struct ide_port_info d; | 261 | struct ide_port_info d; |
262 | u8 idx = id->driver_data; | 262 | u8 idx = id->driver_data; |
263 | int err; | ||
264 | |||
265 | err = pci_enable_device(dev); | ||
266 | if (err) | ||
267 | return err; | ||
263 | 268 | ||
264 | d = aec62xx_chipsets[idx]; | 269 | d = aec62xx_chipsets[idx]; |
265 | 270 | ||
@@ -272,7 +277,11 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
272 | } | 277 | } |
273 | } | 278 | } |
274 | 279 | ||
275 | return ide_setup_pci_device(dev, &d); | 280 | err = ide_setup_pci_device(dev, &d); |
281 | if (err) | ||
282 | pci_disable_device(dev); | ||
283 | |||
284 | return err; | ||
276 | } | 285 | } |
277 | 286 | ||
278 | static const struct pci_device_id aec62xx_pci_tbl[] = { | 287 | static const struct pci_device_id aec62xx_pci_tbl[] = { |