diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2002-10-13 21:18:09 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2002-10-13 21:18:09 +0100 |
| commit | 4c515af57efa03e0cd3f3a62136d117a8425d6dd (patch) | |
| tree | 915231410561dc4ec43f327a4461352f28bb13ec | |
| parent | da4acd13a42fa748fefab6a73d26903ac84b054c (diff) | |
[ARM] Update integrator-flash.c from MTD CVS
Keep the partition information around for the lifetime of the module.
| -rw-r--r-- | drivers/mtd/maps/integrator-flash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index 0b22c6e60417..cd58f8fae012 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c @@ -21,7 +21,7 @@ This is access code for flashes using ARM's flash partitioning standards. - $Id: integrator-flash.c,v 1.6 2001/10/02 16:00:01 dwmw2 Exp $ + $Id: integrator-flash.c,v 1.7 2001/11/01 20:55:47 rmk Exp $ ======================================================================*/ @@ -208,10 +208,10 @@ static struct map_info armflash_map = }; static struct mtd_info *mtd; +static struct mtd_partition *parts; static int __init armflash_cfi_init(void *base, u_int size) { - struct mtd_partition *parts; int ret; armflash_flash_init(); @@ -238,8 +238,6 @@ static int __init armflash_cfi_init(void *base, u_int size) ret = parse_afs_partitions(mtd, &parts); if (ret > 0) { ret = add_mtd_partitions(mtd, parts, ret); - /* we don't need the partition info any longer */ - kfree(parts); if (ret) printk(KERN_ERR "mtd partition registration " "failed: %d\n", ret); @@ -262,6 +260,8 @@ static void armflash_cfi_exit(void) del_mtd_partitions(mtd); map_destroy(mtd); } + if (parts) + kfree(parts); } static int __init armflash_init(void) |
