]> www.infradead.org Git - users/jedix/linux-maple.git/commit
soc: ti: knav: Use of_property_read_variable_u32_array()
authorRob Herring (Arm) <robh@kernel.org>
Wed, 31 Jul 2024 20:13:58 +0000 (14:13 -0600)
committerNishanth Menon <nm@ti.com>
Tue, 6 Aug 2024 21:29:13 +0000 (16:29 -0500)
commitb2a0176620db7aa0aa77109d7a8b894755441079
tree85eadff856faf4413dcece000a62aca0eff7b043
parent8737e167dc55cc00c5818b408f47ba03b6ddb25b
soc: ti: knav: Use of_property_read_variable_u32_array()

There's no need to get the length of an DT array property before
parsing the array. of_property_read_variable_u32_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_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@kernel.org>
Link: https://lore.kernel.org/r/20240731201407.1838385-3-robh@kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/knav_dma.c