[PATCH 2/2] drm/fsl-dcu: check for clk_prepare_enable() error

2016-12-29 Thread Stefan Agner
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

[PATCH 2/2] drm/fsl-dcu: check for clk_prepare_enable() error

2016-12-28 Thread Gabriel Krisman Bertazi
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

[PATCH 2/2] drm/fsl-dcu: check for clk_prepare_enable() error

2016-12-28 Thread Fabio Estevam
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().

[PATCH 2/2] drm/fsl-dcu: check for clk_prepare_enable() error

2016-12-28 Thread Gabriel Krisman Bertazi
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

[PATCH 2/2] drm/fsl-dcu: check for clk_prepare_enable() error

2016-12-28 Thread Fabio Estevam
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