mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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: Rob Herring (Arm) <robh@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20240731191312.1710417-15-robh@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
7c626ce4ba
commit
48b035121a
@ -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)
|
||||
{
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user