aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_via.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index d4840748fb5c..2fea6cbe7755 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -464,11 +464,12 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
464 } 464 }
465 pci_dev_put(isa); 465 pci_dev_put(isa);
466 466
467 /* 0x40 low bits indicate enabled channels */ 467 if (!(config->flags & VIA_NO_ENABLES)) {
468 pci_read_config_byte(pdev, 0x40 , &enable); 468 /* 0x40 low bits indicate enabled channels */
469 enable &= 3; 469 pci_read_config_byte(pdev, 0x40 , &enable);
470 if (enable == 0) { 470 enable &= 3;
471 return -ENODEV; 471 if (enable == 0)
472 return -ENODEV;
472 } 473 }
473 474
474 /* Initialise the FIFO for the enabled channels. */ 475 /* Initialise the FIFO for the enabled channels. */