summaryrefslogtreecommitdiff
path: root/drivers/misc/enclosure.c
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-07-31 14:14:00 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-07 12:51:20 +0200
commitf358602425486fce2eac1a9592444c9840557754 (patch)
treeb743afdfb35015afcb981178e8eb9643836b0161 /drivers/misc/enclosure.c
parent89b7539123bf970d7c013645558bc344aef792b0 (diff)
usb: dwc3: Use of_property_read_variable_u32_array() to read "power"
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> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20240731201407.1838385-5-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/enclosure.c')
0 files changed, 0 insertions, 0 deletions