linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: mxs: free dma_mask in error path
Date: Fri, 18 Feb 2011 22:30:28 +0100	[thread overview]
Message-ID: <1298064632-15262-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20110218213022.GJ22310@pengutronix.de>

From: Lothar Wa?mann <LW@KARO-electronics.de>

This fixes a small memory leak that was only hit in very unlikely error
paths.

Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-mxs/devices.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c
index c20d547..cfdb6b2 100644
--- a/arch/arm/mach-mxs/devices.c
+++ b/arch/arm/mach-mxs/devices.c
@@ -66,6 +66,8 @@ struct platform_device *__init mxs_add_platform_device_dmamask(
 	ret = platform_device_add(pdev);
 	if (ret) {
 err:
+		if (dmamask)
+			kfree(pdev->dev.dma_mask);
 		platform_device_put(pdev);
 		return ERR_PTR(ret);
 	}
-- 
1.7.2.3

  reply	other threads:[~2011-02-18 21:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 21:30 [PATCH 0/5] my imx patches for 2.6.39 Uwe Kleine-König
2011-02-18 21:30 ` Uwe Kleine-König [this message]
2011-02-18 21:30 ` [PATCH 2/5] ARM: mxc: free dma_mask in error path Uwe Kleine-König
2011-02-18 21:30 ` [PATCH 3/5] ARM: mxs: add a dma mask to fec devices Uwe Kleine-König
2011-02-18 21:30 ` [PATCH 4/5] ARM: mxc: " Uwe Kleine-König
2011-02-18 21:30 ` [PATCH 5/5] ARM: mxs: Add pwm clocks and device registration Uwe Kleine-König
2011-02-23  9:12 ` [PATCH 0/5] my imx patches for 2.6.39 Uwe Kleine-König
2011-02-23  9:13   ` [PATCH] ARM: mx51_defconfig: enable various options Uwe Kleine-König
2011-02-24 21:03 ` [PATCH 0/5] my imx patches for 2.6.39 Uwe Kleine-König
2011-02-24 21:04   ` [PATCH] ARM: mxs: Initial support for Ka-Ro TX28 Uwe Kleine-König
2011-02-25  9:00     ` Uwe Kleine-König
2011-02-26  7:50     ` Shawn Guo

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=1298064632-15262-1-git-send-email-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --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).