drm: bridge: anx7625: Use of_property_read_variable_u8_array()
authorRob Herring (Arm) <robh@kernel.org>
Wed, 31 Jul 2024 20:13:59 +0000 (14:13 -0600)
committerRobert Foss <rfoss@kernel.org>
Mon, 19 Aug 2024 13:27:43 +0000 (15:27 +0200)
commit11c742bb5a26d4adc873f6e6e2b69a59e1eae285
treedb4e396072b3b417e2cc4f81227e1754844d2051
parent737ad3776343f6fcffee9d0d849dcd6f6b25f05a
drm: bridge: anx7625: Use of_property_read_variable_u8_array()

There's no need to get the length of an DT array property before
parsing the array. of_property_read_variable_u8_array() takes a minimum
and maximum length and returns the actual length (or error code).

This is part of a larger effort to remove callers of of_get_property()
and similar functions. of_get_property() leaks the DT property data
pointer which is a problem for dynamically allocated nodes which may
be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240731201407.1838385-4-robh@kernel.org
drivers/gpu/drm/bridge/analogix/anx7625.c