From: Emil Goode <emilgoode@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Shawn Guo" <shawn.guo@freescale.com>,
"Sascha Hauer" <kernel@pengutronix.de>,
"Russell King" <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ARM: imx: add missing kfree call in error paths
Date: Thu, 22 May 2014 16:44:46 +0200 [thread overview]
Message-ID: <20140522144446.GA7348@lianli> (raw)
In-Reply-To: <20140522135016.GK15585@mwanda>
Hello Dan,
On Thu, May 22, 2014 at 04:50:16PM +0300, Dan Carpenter wrote:
> On Thu, May 22, 2014 at 03:14:42PM +0200, Emil Goode wrote:
> > We forgot to free pdev->dev.dma_mask as it is not freed
> > by platform_device_put().
> >
>
> Every function which calls imx31_alloc_mx3_camera() is buggy. That
> means that, at best, it is a 2 on Rusty's API rating.
> http://sweng.the-davies.net/Home/rustys-api-design-manifesto
>
> The correct fix is to introduce an imx31_free_mx3_camera() otherwise we
> will just keep introducing these bugs.
I guess I could add this to arch/arm/mach-imx/devices/platform-ipu-core.c
it would be a very small function though.
Best regards,
Emil Goode
next prev parent reply other threads:[~2014-05-22 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 13:14 [PATCH] ARM: imx: add missing kfree call in error paths Emil Goode
2014-05-22 13:50 ` Dan Carpenter
2014-05-22 14:44 ` Emil Goode [this message]
2014-05-22 20:12 ` Dan Carpenter
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=20140522144446.GA7348@lianli \
--to=emilgoode@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=shawn.guo@freescale.com \
--cc=u.kleine-koenig@pengutronix.de \
/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