[PATCH] spi: pl022: handle clk_prepare_enable() failure on runtime resume

Jonathan Cameron jic23 at kernel.org
Mon Nov 16 19:02:58 PST 2026


On Tue, 17 Nov 2026 10:07:11 +0800
Luo Yifan <luoyifan at cmss.chinamobile.com> wrote:

> pl022_runtime_resume() ignores the return value of clk_prepare_enable()
> and always returns 0.  A failed runtime resume is therefore reported as
> success and the controller is used with its clock off.
> 
> Return the error from clk_prepare_enable().
> 
> Signed-off-by: Luo Yifan <luoyifan at cmss.chinamobile.com>

You should probably resend including linux-spi and appropriate maintainers
and dropping IIO folk.

> ---
>  drivers/spi/spi-pl022.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index f52130465a..64bf9c4b0a 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -2067,9 +2067,8 @@ static int pl022_runtime_resume(struct device *dev)
>  	struct pl022 *pl022 = dev_get_drvdata(dev);
>  
>  	pinctrl_pm_select_default_state(dev);
> -	clk_prepare_enable(pl022->clk);
>  
> -	return 0;
> +	return clk_prepare_enable(pl022->clk);
>  }
>  
>  static const struct dev_pm_ops pl022_dev_pm_ops = {




More information about the linux-arm-kernel mailing list