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

Stefan Agner stefan at agner.ch
Thu Dec 29 07:12:06 UTC 2016


On 2016-12-28 19:53, Gabriel Krisman Bertazi wrote:
> Fabio Estevam <festevam at gmail.com> writes:
> 
>> On Wed, Dec 28, 2016 at 4:38 PM, Gabriel Krisman Bertazi
>> <krisman at collabora.co.uk> 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 not the case here, since failing
> fsl_tcon_init is not fatal and the initialization continues in this
> case.

That is probably true, but does it matter? I guess it is anyway an
unlikely case, so why bother?

--
Stefan


More information about the dri-devel mailing list