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 <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shubhrajyoti Datta 2016-05-04 17:27:50 +05:30 committed by Mark Brown
parent f55532a0c0
commit ba412e343d
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}