On 2016-12-28 19:53, Gabriel Krisman Bertazi wrote:
> Fabio Estevam writes:
>
>> On Wed, Dec 28, 2016 at 4:38 PM, Gabriel Krisman Bertazi
>> wrote:
>>
>>> This leaks tcon if clk_prepare_enable fails.
>>
>> No, it does not as tcon is allocated via devm_kzalloc().
>
> Agreed. But I think devm_kz
Fabio Estevam writes:
> On Wed, Dec 28, 2016 at 4:38 PM, Gabriel Krisman Bertazi
> wrote:
>
>> This leaks tcon if clk_prepare_enable fails.
>
> No, it does not as tcon is allocated via devm_kzalloc().
Agreed. But I think devm_kzalloc() only drops the memory once the
device is removed, which is
On Wed, Dec 28, 2016 at 4:38 PM, Gabriel Krisman Bertazi
wrote:
> This leaks tcon if clk_prepare_enable fails.
No, it does not as tcon is allocated via devm_kzalloc().
Fabio Estevam writes:
> From: Fabio Estevam
>
> clk_prepare_enable() may fail, so we should better check its return
> value.
>
> Also place the of_node_put() function right after clk_prepare_enable(),
> in order to avoid calling of_node_put() twice in case clk_prepare_enable()
> fails.
>
> Sign
From: Fabio Estevam
clk_prepare_enable() may fail, so we should better check its return
value.
Also place the of_node_put() function right after clk_prepare_enable(),
in order to avoid calling of_node_put() twice in case clk_prepare_enable()
fails.
Signed-off-by: Fabio Estevam
---
drivers/gp