diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-22 12:49:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-22 12:49:18 -0700 |
commit | a48178a2fa17beee17d7e6aeaa6ed2db5813552d (patch) | |
tree | 74579777d047478b3d62fcc3349a903b53515770 /drivers/mtd/maps/arctic-mtd.c | |
parent | 14d1adfc59ba66932ef167fdff62983e7c2b0197 (diff) | |
parent | 734a56285dbeedc6cc10aef6f700eeab7c65ea9f (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
Remove accidentally-added include/linux/utsrelease.h
Revert "[MTD] blkdev helper code: fix printk format warning"
[MTD] Add SSFDC (SmartMedia) read-only translation layer
[MTD] pmc551 pci cleanup
[MTD] pmc551 use kzalloc
[MTD] pmc551 whitespace cleanup
[MTD] Remove iq80310 map driver
[MTD NAND] Fix in typo ndfc.c causing wrong ECC layout
[MTD] physmap: add power management support
ioremap balanced with iounmap for drivers/mtd subsystem
[MTD] Switch to pci_get_device and do ref counting
[MTD] blkdev helper code: fix printk format warning
[MTD] Fix ixp4xx partition parsing.
[JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h
[MTD NAND] Remove old code in au1550nd.c
[MTD] Unlock NOR flash automatically where necessary
Diffstat (limited to 'drivers/mtd/maps/arctic-mtd.c')
-rw-r--r-- | drivers/mtd/maps/arctic-mtd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/mtd/maps/arctic-mtd.c b/drivers/mtd/maps/arctic-mtd.c index d95ae582fbe..642d96bc891 100644 --- a/drivers/mtd/maps/arctic-mtd.c +++ b/drivers/mtd/maps/arctic-mtd.c @@ -96,6 +96,8 @@ static struct mtd_partition arctic_partitions[PARTITIONS] = { static int __init init_arctic_mtd(void) { + int err = 0; + printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); arctic_mtd_map.virt = ioremap(PADDR, SIZE); @@ -109,12 +111,20 @@ init_arctic_mtd(void) printk("%s: probing %d-bit flash bus\n", NAME, BUSWIDTH * 8); arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map); - if (!arctic_mtd) + if (!arctic_mtd) { + iounmap((void *) arctic_mtd_map.virt); return -ENXIO; + } arctic_mtd->owner = THIS_MODULE; - return add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); + err = add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); + if (err) { + printk("%s: add_mtd_partitions failed\n", NAME); + iounmap((void *) arctic_mtd_map.virt); + } + + return err; } static void __exit |