linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: aaro.koskinen@nokia.com (Aaro Koskinen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: mach-omap2: mux: free allocated memory on error exit
Date: Fri, 28 Jan 2011 16:50:55 +0200	[thread overview]
Message-ID: <1296226255-5694-1-git-send-email-aaro.koskinen@nokia.com> (raw)

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

             reply	other threads:[~2011-01-28 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 14:50 Aaro Koskinen [this message]
2011-02-01 23:52 ` [PATCH] arm: mach-omap2: mux: free allocated memory on error exit Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296226255-5694-1-git-send-email-aaro.koskinen@nokia.com \
    --to=aaro.koskinen@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).