[PATCH] drm: mediatek: Drop unnecessary check for property presence

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Thu Aug 1 01:23:54 PDT 2024


Il 31/07/24 22:13, Rob Herring (Arm) ha scritto:
> of_property_read_u32() returns -EINVAL if a property is not present, so
> the preceeding check for presence with of_find_property() can be
> dropped. Really, what the errno is shouldn't matter. Either the property
> can be read and used or it can't and is ignored.
> 
> This is part of a larger effort to remove callers of of_find_property()
> and similar functions. of_find_property() leaks the DT struct property
> and data pointers which is a problem for dynamically allocated nodes
> which may be freed.
> 
> Signed-off-by: Rob Herring (Arm) <robh at kernel.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the Linux-mediatek mailing list