diff mbox

[for,2.6.29?,4/4] mtd/maps: blackfin async flash maps: fix up memory leak

Message ID 8bd0f97a0902171202i449ede68k3dd726039b4c2f4a@mail.gmail.com
State New, archived
Headers show

Commit Message

Mike Frysinger Feb. 17, 2009, 8:02 p.m. UTC
On Sat, Feb 14, 2009 at 03:57, David Woodhouse wrote:
> On Wed, 2009-02-11 at 16:42 -0800, Andrew Morton wrote:
>> > Revised patch for physmap driver is:
>> >
>> http://lists.infradead.org/pipermail/linux-mtd/2009-February/024590.html
>> >
>> > Mike, please update this blackfin patch too.
>> >
>>
>> I don't have a copy of that patch.  You're on you own, guys..
>
> Er, wasn't your [1/4] actually Nemoto-san's latest physmap patch?
>
> Mike, please can I have an updated version of the blackfin patch?
>
> Nemoto-san, thank you for taking care of this.

i'm not entirely sure what the change is by reading that patch.  what
i've got is attached.
-mike

Comments

Atsushi Nemoto Feb. 19, 2009, 12:37 a.m. UTC | #1
On Tue, 17 Feb 2009 15:02:11 -0500, Mike Frysinger <vapier.adi@gmail.com> wrote:
> i'm not entirely sure what the change is by reading that patch.  what
> i've got is attached.

Looks fine for me.  Thanks.
---
Atsushi Nemoto
Mike Frysinger Feb. 19, 2009, 1:19 a.m. UTC | #2
On Wed, Feb 18, 2009 at 19:37, Atsushi Nemoto wrote:
> On Tue, 17 Feb 2009 15:02:11 -0500, Mike Frysinger wrote:
>> i'm not entirely sure what the change is by reading that patch.  what
>> i've got is attached.
>
> Looks fine for me.  Thanks.

ok, i'll wait for my other patches against bfin-async-flash to make it
into mainline and i'll post a follow up patch for this.
-mike
diff mbox

Patch

--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -41,4 +41,7 @@ 
 	uint32_t save_ambctl0, save_ambctl1;
 	unsigned long irq_flags;
+#ifdef CONFIG_MTD_PARTITIONS
+	struct mtd_partition *parts;
+#endif
 };
 
@@ -167,4 +174,5 @@ 
 		pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n");
 		add_mtd_partitions(state->mtd, pdata->parts, ret);
+		state->parts = pdata->parts;
 
 	} else if (pdata->nr_parts) {
@@ -190,4 +198,5 @@ 
 #ifdef CONFIG_MTD_PARTITIONS
 	del_mtd_partitions(state->mtd);
+	kfree(state->parts);
 #endif
 	map_destroy(state->mtd);