[PATCH] mediatek/clk-mt8173-apmixedsys: convert to devm_platform_ioremap_resource

Stephen Boyd sboyd at kernel.org
Thu Apr 13 11:40:22 PDT 2023


Quoting Hao Ge (2023-04-13 02:01:28)
> diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
> index a56c5845d07a..fe386bf8225d 100644
> --- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
> +++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
> @@ -90,7 +90,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
>         struct clk_hw *hw;
>         int r;
>  
> -       base = of_iomap(node, 0);
> +       base = devm_platform_ioremap_resource(pdev, 0);
>         if (!base)

This needs to be updated.

>                 return PTR_ERR(base);

And PTR_ERR(NULL) is 0, which is wrong.



More information about the Linux-mediatek mailing list