summaryrefslogtreecommitdiffstats
path: root/drivers/ata/intf_platform_ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/intf_platform_ide.c')
-rw-r--r--drivers/ata/intf_platform_ide.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/intf_platform_ide.c b/drivers/ata/intf_platform_ide.c
index 851f8f5c5b..0d392d8d4a 100644
--- a/drivers/ata/intf_platform_ide.c
+++ b/drivers/ata/intf_platform_ide.c
@@ -84,7 +84,7 @@ static int platform_ide_probe(struct device_d *dev)
struct ide_port *ide;
void *reg_base, *alt_base = NULL;
struct resource *reg, *alt;
- int mmio;
+ int mmio = 0;
if (pdata == NULL) {
dev_err(dev, "No platform data. Cannot continue\n");
@@ -92,9 +92,12 @@ static int platform_ide_probe(struct device_d *dev)
}
reg_base = dev_request_mem_region(dev, 0);
- mmio = (reg_base != NULL);
- if (mmio) {
+
+ if (!IS_ERR(reg_base)) {
+ mmio = 1;
alt_base = dev_request_mem_region(dev, 1);
+ if (IS_ERR(alt_base))
+ alt_base = NULL;
} else {
reg = dev_get_resource(dev, IORESOURCE_IO, 0);
if (IS_ERR(reg))