From: Hongbo Yao Date: Tue, 1 Apr 2025 05:42:48 +0000 (+0800) Subject: perf: arm-ni: Fix missing platform_set_drvdata() X-Git-Tag: v6.16-rc1~133^2~4^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc5106088d6db75df61308ef6de314d1f7959646;p=thirdparty%2Fkernel%2Flinux.git perf: arm-ni: Fix missing platform_set_drvdata() 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 Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20250401054248.3985814-1-andy.xu@hj-micro.com Signed-off-by: Will Deacon --- diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c index 0c418a7ee10f3..de7b6cce4d68a 100644 --- a/drivers/perf/arm-ni.c +++ b/drivers/perf/arm-ni.c @@ -660,6 +660,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));