Thread (11 messages) 11 messages, 3 authors, 2014-02-19

[PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver

From: Ivan Khoronzhuk <hidden>
Date: 2014-02-19 17:05:48
Also in: linux-devicetree, lkml

On 02/19/2014 04:34 PM, Greg KH wrote:
On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote:
quoted
quoted
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help