diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2013-09-12 21:01:29 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-10-07 19:17:32 (GMT) |
commit | fc0012ec533def054e1ac57d54ed781fc0ab6b71 (patch) | |
tree | 718c9bad11d2bc99fd0fe63e95cd6b9618dce1cc /drivers/ata/pata_isapnp.c | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) | |
download | linux-fsl-qoriq-fc0012ec533def054e1ac57d54ed781fc0ab6b71.tar.xz |
pata_isapnp: Don't use invalid I/O ports
The test for 2nd I/O port validity is broken (reversed): On devices
with no control port, the driver attempts to use invalid port 0,
resulting in logs full of bad_io_access errors. On devices with
control port, the driver does not use it.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/pata_isapnp.c')
-rw-r--r-- | drivers/ata/pata_isapnp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index 4bceb88..b33d1f9 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c @@ -78,7 +78,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev ap->ioaddr.cmd_addr = cmd_addr; - if (pnp_port_valid(idev, 1) == 0) { + if (pnp_port_valid(idev, 1)) { ctl_addr = devm_ioport_map(&idev->dev, pnp_port_start(idev, 1), 1); ap->ioaddr.altstatus_addr = ctl_addr; |