aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2008-10-23 23:22:06 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-23 23:22:06 +0200
commit3059ef99a167da6d5d77701fda5b905d985e31af (patch)
treea3475fd12b804a9bd52ad6e54446ed2bc5f969e0 /drivers
parentd2441183dc222d12961ff2201f5086c846505d93 (diff)
sgiioc4: fix error cleanup path (take 2)
The driver "forgot" to call iounmap() iff request_mem_region() call failed in sgiioc4_ide_setup_pci_device()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: jeremy@sgi.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/sgiioc4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c
index 8af9b23499f..9fadea41e1c 100644
--- a/drivers/ide/sgiioc4.c
+++ b/drivers/ide/sgiioc4.c
@@ -590,7 +590,8 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
printk(KERN_ERR "%s %s -- ERROR: addresses 0x%08lx to 0x%08lx "
"already in use\n", DRV_NAME, pci_name(dev),
cmd_phys_base, cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE);
- return -EBUSY;
+ rc = -EBUSY;
+ goto req_mem_rgn_err;
}
/* Initialize the IO registers */
@@ -618,6 +619,7 @@ err_free:
ide_host_free(host);
err:
release_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE);
+req_mem_rgn_err:
iounmap(virt_base);
return rc;
}