[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5304E41F.4080205@ti.com>
Date: Wed, 19 Feb 2014 19:04:31 +0200
From: Ivan Khoronzhuk <ivan.khoronzhuk@...com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <santosh.shilimkar@...com>, <rob@...dley.net>,
<linux@....linux.org.uk>, <galak@...nel.crashing.org>,
<devicetree@...r.kernel.org>, <pawel.moll@....com>,
<mark.rutland@....com>, <rob.herring@...xeda.com>,
<swarren@...dotorg.org>, <ijc+devicetree@...lion.org.uk>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mtd@...ts.infradead.org>, <grygorii.strashko@...com>,
<dwmw2@...radead.org>, <nsekhar@...com>,
"[initial author] Murali Karicheri" <m-karicheri2@...com>
Subject: Re: [PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver
On 02/19/2014 04:34 PM, Greg KH wrote:
> On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote:
>>>> + aemif->clk = devm_clk_get(dev, NULL);
>>>> + if (IS_ERR(aemif->clk)) {
>>>> + dev_err(dev, "cannot get clock 'aemif'\n");
>>>> + return PTR_ERR(aemif->clk);
>>> No freeing memory?
>> There is no need to free memory explicitly.
>> devm_kzalloc is used instead of kzalloc.
> Yes, but where does the device on the error path get removed?
Why these functions are needed in that case...
As I see, memory allocated with these functions
are automatically freed on driver detach.
Additionally I've checked if resources are released after
AEMIF driver probe error.
And they're released completely in case of probe error.
:-\
--
Regards,
Ivan Khoronzhuk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists