diff mbox

arm: mach-omap2: mux: free allocated memory on error exit

Message ID 1296226255-5694-1-git-send-email-aaro.koskinen@nokia.com (mailing list archive)
State Accepted
Commit 9d47e309015b8d5ab32851cd0216e4b96b6407e4
Delegated to: Tony Lindgren
Headers show

Commit Message

Koskinen, Aaro (Nokia - FI/Espoo) Jan. 28, 2011, 2:50 p.m. UTC
None
diff mbox

Patch

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;
 	}