diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-07-31 21:12:53 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-08-16 14:08:21 +0200 |
commit | 48b035121a564f2695462fbab0d2af51cb4f4b7a (patch) | |
tree | e99a838caf63d8eec1ed55ca062239975ea2436e /drivers/perf | |
parent | Linux 6.11-rc3 (diff) | |
download | linux-48b035121a564f2695462fbab0d2af51cb4f4b7a.tar.xz linux-48b035121a564f2695462fbab0d2af51cb4f4b7a.zip |
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>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_pmu_platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c index 4b1a9a92ea11..118170a5cede 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -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) |