From: Shubhrajyoti Datta Date: Wed, 4 May 2016 11:57:50 +0000 (+0530) Subject: spi: zynqmp: disable clocks in error paths X-Git-Tag: v4.7-rc1~64^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba412e343d8bd628c1568a9b130210cc7d55e01c;p=platform%2Fkernel%2Flinux-exynos.git spi: zynqmp: disable clocks in error paths The if pclk enable fails the refclk is not disabled. Fix the same. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index aab9b49..18aeace 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -360,7 +360,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master) ret = clk_enable(xqspi->refclk); if (ret) - goto clk_err; + return ret; ret = clk_enable(xqspi->pclk); if (ret) @@ -369,6 +369,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master) zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK); return 0; clk_err: + clk_disable(xqspi->refclk); return ret; }