]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf: arm-ni: Fix missing platform_set_drvdata()
authorHongbo Yao <andy.xu@hj-micro.com>
Tue, 1 Apr 2025 05:42:48 +0000 (13:42 +0800)
committerWill Deacon <will@kernel.org>
Thu, 17 Apr 2025 13:27:34 +0000 (14:27 +0100)
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@hj-micro.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20250401054248.3985814-1-andy.xu@hj-micro.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-ni.c

index 0c418a7ee10f316001561bcafc01c155fac0f33f..de7b6cce4d68a881e378deb75be82371ba7e6723 100644 (file)
@@ -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));