diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-22 20:10:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-22 20:10:23 -0400 |
commit | 28eb177dfa5982d132edceed891cb3885df258bb (patch) | |
tree | 5f8fdc37ad1d8d0793e9c47da7d908b97c814ffb /drivers/mtd/maps/arctic-mtd.c | |
parent | fd8ae94eea9bb4269d6dff1b47b9dc741bd70d0b (diff) | |
parent | db392219c5f572610645696e3672f6ea38783a65 (diff) |
Merge branch 'master' into upstream
Conflicts:
net/ieee80211/ieee80211_crypt_tkip.c
net/ieee80211/ieee80211_crypt_wep.c
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 d95ae582fbe9..642d96bc8919 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] = { | |||
96 | static int __init | 96 | static int __init |
97 | init_arctic_mtd(void) | 97 | init_arctic_mtd(void) |
98 | { | 98 | { |
99 | int err = 0; | ||
100 | |||
99 | printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); | 101 | printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); |
100 | 102 | ||
101 | arctic_mtd_map.virt = ioremap(PADDR, SIZE); | 103 | arctic_mtd_map.virt = ioremap(PADDR, SIZE); |
@@ -109,12 +111,20 @@ init_arctic_mtd(void) | |||
109 | printk("%s: probing %d-bit flash bus\n", NAME, BUSWIDTH * 8); | 111 | printk("%s: probing %d-bit flash bus\n", NAME, BUSWIDTH * 8); |
110 | arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map); | 112 | arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map); |
111 | 113 | ||
112 | if (!arctic_mtd) | 114 | if (!arctic_mtd) { |
115 | iounmap((void *) arctic_mtd_map.virt); | ||
113 | return -ENXIO; | 116 | return -ENXIO; |
117 | } | ||
114 | 118 | ||
115 | arctic_mtd->owner = THIS_MODULE; | 119 | arctic_mtd->owner = THIS_MODULE; |
116 | 120 | ||
117 | return add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); | 121 | err = add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); |
122 | if (err) { | ||
123 | printk("%s: add_mtd_partitions failed\n", NAME); | ||
124 | iounmap((void *) arctic_mtd_map.virt); | ||
125 | } | ||
126 | |||
127 | return err; | ||
118 | } | 128 | } |
119 | 129 | ||
120 | static void __exit | 130 | static void __exit |