[PATCH] perf: arm-ni: Fix missing platform_set_drvdata()
Hongbo Yao
andy.xu at hj-micro.com
Mon Mar 31 22:42:48 PDT 2025
Add missing platform_set_drvdata in arm_ni_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.
Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU")
Signed-off-by: Hongbo Yao <andy.xu at hj-micro.com>
---
drivers/perf/arm-ni.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
index ee85577e86b9..da1907b7391d 100644
--- a/drivers/perf/arm-ni.c
+++ b/drivers/perf/arm-ni.c
@@ -666,6 +666,7 @@ static int arm_ni_probe(struct platform_device *pdev)
ni->num_cds = num_cds;
ni->part = part;
ni->id = atomic_fetch_inc(&id);
+ platform_set_drvdata(pdev, ni);
for (int v = 0; v < cfg.num_components; v++) {
reg = readl_relaxed(cfg.base + NI_CHILD_PTR(v));
--
2.43.0
More information about the linux-arm-kernel
mailing list