patch-2.4.19 linux-2.4.19/drivers/mtd/maps/integrator-flash.c
Next file: linux-2.4.19/drivers/mtd/maps/iq80310.c
Previous file: linux-2.4.19/drivers/mtd/maps/ich2rom.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/mtd/maps/integrator-flash.c
- Orig date:
Thu Oct 4 15:14:59 2001
diff -urN linux-2.4.18/drivers/mtd/maps/integrator-flash.c linux-2.4.19/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 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 @@
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 @@
del_mtd_partitions(mtd);
map_destroy(mtd);
}
+ if (parts)
+ kfree(parts);
}
static int __init armflash_init(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)