[PATCH 1/2] clk: imx: imx8: Fix an IS_ERR() vs NULL check in clk_imx_acm_attach_pm_domains()

Abel Vesa abel.vesa at linaro.org
Wed Oct 4 01:29:28 PDT 2023


On 23-10-02 10:01:51, Dan Carpenter wrote:
> The device_link_add() function returns NULL on error.  It doesn't return
> error pointers.  Fix the check accordingly.
> 
> Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> ---

LGTM.

Reviewed-by: Abel Vesa <abel.vesa at linaro.org>

However, this doesn't apply for some reason. Can you rebase and resend?

>  drivers/clk/imx/clk-imx8-acm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
> index 1e82f72b75c6..83019b986622 100644
> --- a/drivers/clk/imx/clk-imx8-acm.c
> +++ b/drivers/clk/imx/clk-imx8-acm.c
> @@ -287,9 +287,9 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev,
>  							 DL_FLAG_STATELESS |
>  							 DL_FLAG_PM_RUNTIME |
>  							 DL_FLAG_RPM_ACTIVE);
> -		if (IS_ERR(dev_pm->pd_dev_link[i])) {
> +		if (!dev_pm->pd_dev_link[i]) {
>  			dev_pm_domain_detach(dev_pm->pd_dev[i], false);
> -			ret = PTR_ERR(dev_pm->pd_dev_link[i]);
> +			ret = -EINVAL;
>  			goto detach_pm;
>  		}
>  	}
> -- 
> 2.39.2
> 



More information about the linux-arm-kernel mailing list