From: Sascha Hauer <s.hauer@pengutronix.de>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Sergei Ianovich <ynvich@gmail.com>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
James Cameron <quozl@laptop.org>,
Russell King <linux@arm.linux.org.uk>,
Jiri Slaby <jslaby@suse.cz>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Zhou Zhu <zzhu3@marvell.com>,
Andrew Morton <akpm@linux-foundation.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Stefan Seyfried <seife+kernel@b1-systems.com>,
John Crispin <blogic@openwrt.org>,
Paul Bolle <pebolle@tiscali.nl>,
"moderated list:ARM PORT" <linux-arm-kernel@lists.infradead.org>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2] serial: rewrite pxa2xx-uart to use 8250_core
Date: Mon, 9 Dec 2013 09:44:25 +0100 [thread overview]
Message-ID: <20131209084425.GO24559@pengutronix.de> (raw)
In-Reply-To: <20131209083815.GA5231@xps8300>
On Mon, Dec 09, 2013 at 10:38:15AM +0200, Heikki Krogerus wrote:
> Hi,
>
> > + return 0;
> > +
> > + err_clk:
> > + clk_unprepare(data->clk);
> > + err_free_clk:
> > + devm_clk_put(&pdev->dev, data->clk);
> > + err_free:
> > + devm_kfree(&pdev->dev, data);
>
> And there labels could be dropped.
This should really be fixed. Explicitly releasing devm_* allocated
resources invalidates the whole idea of the devm functions. People
looking for templates shouldn't find examples for this in the kernel.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2013-12-09 8:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1385879185-22455-1-git-send-email-ynvich@gmail.com>
2013-12-01 6:26 ` [PATCH 01/11] resolve PXA<->8250 serial device address conflict Sergei Ianovich
2013-12-02 9:02 ` Heikki Krogerus
2013-12-02 9:23 ` Sergei Ianovich
2013-12-02 9:49 ` Heikki Krogerus
2013-12-02 10:26 ` Sergei Ianovich
2013-12-02 14:10 ` Heikki Krogerus
2013-12-05 4:12 ` Greg Kroah-Hartman
2013-12-05 4:31 ` Sergei Ianovich
2013-12-05 4:35 ` Greg Kroah-Hartman
2013-12-05 4:36 ` Sergei Ianovich
[not found] ` <20131205043544.GA28580-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-12-05 23:28 ` [PATCH] serial: rewrite pxa2xx-uart to use 8250_core Sergei Ianovich
[not found] ` <1386286149-2855-1-git-send-email-ynvich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-06 0:02 ` Greg Kroah-Hartman
[not found] ` <20131206000253.GC21358-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-12-06 0:17 ` Russell King - ARM Linux
2013-12-06 9:28 ` Sergei Ianovich
2013-12-06 9:53 ` James Cameron
2013-12-06 10:34 ` Sergei Ianovich
2013-12-06 11:05 ` James Cameron
2013-12-06 0:38 ` James Cameron
2013-12-06 2:55 ` James Cameron
2013-12-06 2:42 ` James Cameron
2013-12-06 9:16 ` Sergei Ianovich
2013-12-06 9:09 ` [PATCH v2] " Sergei Ianovich
2013-12-06 9:28 ` James Cameron
2013-12-09 8:38 ` Heikki Krogerus
2013-12-09 8:44 ` Sascha Hauer [this message]
2013-12-09 11:38 ` [PATCH v3] " Sergei Ianovich
2014-01-28 14:14 ` [PATCH 01/11] resolve PXA<->8250 serial device address conflict Pavel Machek
2014-01-28 14:20 ` Sergei Ianovich
2013-12-01 6:26 ` [PATCH 05/11] serial: support for 16550 serial ports on LP-8x4x Sergei Ianovich
2013-12-02 8:48 ` Heikki Krogerus
2013-12-02 11:46 ` Sergei Ianovich
2013-12-02 13:53 ` Heikki Krogerus
2013-12-02 11:30 ` Russell King - ARM Linux
2013-12-02 11:39 ` Sergei Ianovich
2013-12-02 11:52 ` Russell King - ARM Linux
2013-12-02 12:01 ` Sergei Ianovich
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=20131209084425.GO24559@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=akpm@linux-foundation.org \
--cc=blogic@openwrt.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=haojian.zhuang@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=pebolle@tiscali.nl \
--cc=quozl@laptop.org \
--cc=rob.herring@calxeda.com \
--cc=seife+kernel@b1-systems.com \
--cc=ynvich@gmail.com \
--cc=zzhu3@marvell.com \
/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).