linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: mach-omap2: mux: free allocated memory on error exit
@ 2011-01-28 14:50 Aaro Koskinen
  2011-02-01 23:52 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2011-01-28 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Free allocated memory on error exit.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/arm/mach-omap2/mux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index df8d2f2..18aea0c 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -1000,6 +1000,7 @@ int __init omap_mux_init(const char *name, u32 flags,
 	if (!partition->base) {
 		pr_err("%s: Could not ioremap mux partition at 0x%08x\n",
 			__func__, partition->phys);
+		kfree(partition);
 		return -ENODEV;
 	}
 
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] arm: mach-omap2: mux: free allocated memory on error exit
  2011-01-28 14:50 [PATCH] arm: mach-omap2: mux: free allocated memory on error exit Aaro Koskinen
@ 2011-02-01 23:52 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2011-02-01 23:52 UTC (permalink / raw)
  To: linux-arm-kernel

* Aaro Koskinen <aaro.koskinen@nokia.com> [110128 06:47]:
> Free allocated memory on error exit.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
> ---
>  arch/arm/mach-omap2/mux.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index df8d2f2..18aea0c 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -1000,6 +1000,7 @@ int __init omap_mux_init(const char *name, u32 flags,
>  	if (!partition->base) {
>  		pr_err("%s: Could not ioremap mux partition at 0x%08x\n",
>  			__func__, partition->phys);
> +		kfree(partition);
>  		return -ENODEV;
>  	}

Thanks, adding into devel-fixes for the -rc cycle.

Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-01 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 14:50 [PATCH] arm: mach-omap2: mux: free allocated memory on error exit Aaro Koskinen
2011-02-01 23:52 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).