[PATCH] perf: arm-ni: Fix missing platform_set_drvdata()

Robin Murphy robin.murphy at arm.com
Tue Apr 1 07:04:13 PDT 2025


On 2025-04-01 6:42 am, Hongbo Yao wrote:
> Add missing platform_set_drvdata in arm_ni_probe(), otherwise
> calling platform_get_drvdata() in remove returns NULL.

Oops, indeed. Not sure how that got lost...

Reviewed-by: Robin Murphy <robin.murphy at arm.com>

> 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));




More information about the linux-arm-kernel mailing list