summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_isapnp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_isapnp.c')
-rw-r--r--drivers/ata/pata_isapnp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 994f168b5..4ffbc2a63 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -81,6 +81,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
if (pnp_port_valid(idev, 1)) {
ctl_addr = devm_ioport_map(&idev->dev,
pnp_port_start(idev, 1), 1);
+ if (!ctl_addr)
+ return -ENOMEM;
+
ap->ioaddr.altstatus_addr = ctl_addr;
ap->ioaddr.ctl_addr = ctl_addr;
ap->ops = &isapnp_port_ops;