Commit 48b03512 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Will Deacon

perf: arm_pmu: Use of_property_present()

Use of_property_present() to test for property presence rather than
of_find_property(). 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: default avatarRob Herring (Arm) <robh@kernel.org>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20240731191312.1710417-15-robh@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 7c626ce4
...@@ -59,7 +59,7 @@ static int pmu_parse_percpu_irq(struct arm_pmu *pmu, int irq) ...@@ -59,7 +59,7 @@ static int pmu_parse_percpu_irq(struct arm_pmu *pmu, int irq)
static bool pmu_has_irq_affinity(struct device_node *node) static bool pmu_has_irq_affinity(struct device_node *node)
{ {
return !!of_find_property(node, "interrupt-affinity", NULL); return of_property_present(node, "interrupt-affinity");
} }
static int pmu_parse_irq_affinity(struct device *dev, int i) static int pmu_parse_irq_affinity(struct device *dev, int i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment