RE: [PATCH v1] spi: dw-mmio: Clock should be shut when error occurs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

Thanks for the patch.

On Wed, Jul 10, 2019 at 12:43 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> When optional clock requesting fails, the main clock is still up and running, we
> should shut it down in such caee.
s/caee/case for the typo.
> 
> Fixes: 560ee7e91009 ("spi: dw: Add support for an optional interface clock")
> Cc: Phil Edworthy <phil.edworthy@xxxxxxxxxxx>
> Cc: Gareth Williams <gareth.williams.jx@xxxxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/spi/spi-dw-mmio.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index
> 1c1cac92a9de..4fa7e7a52ebd 100644
> --- a/drivers/spi/spi-dw-mmio.c
> +++ b/drivers/spi/spi-dw-mmio.c
> @@ -170,8 +170,10 @@ static int dw_spi_mmio_probe(struct
> platform_device *pdev)
> 
>  	/* Optional clock needed to access the registers */
>  	dwsmmio->pclk = devm_clk_get_optional(&pdev->dev, "pclk");
> -	if (IS_ERR(dwsmmio->pclk))
> -		return PTR_ERR(dwsmmio->pclk);
> +	if (IS_ERR(dwsmmio->pclk)) {
> +		ret = PTR_ERR(dwsmmio->pclk);
> +		goto out_clk;
> +	}
>  	ret = clk_prepare_enable(dwsmmio->pclk);
>  	if (ret)
>  		goto out_clk;
> --
> 2.20.1

With the above corrected:
Reviewed-by: Gareth Williams <gareth.williams.jx@xxxxxxxxxxx>

Kind Regards,

Gareth Williams




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux