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:

committed by
Mark Brown

parent
f55532a0c0
commit
ba412e343d
@@ -360,7 +360,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master)
|
|||||||
|
|
||||||
ret = clk_enable(xqspi->refclk);
|
ret = clk_enable(xqspi->refclk);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto clk_err;
|
return ret;
|
||||||
|
|
||||||
ret = clk_enable(xqspi->pclk);
|
ret = clk_enable(xqspi->pclk);
|
||||||
if (ret)
|
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);
|
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK);
|
||||||
return 0;
|
return 0;
|
||||||
clk_err:
|
clk_err:
|
||||||
|
clk_disable(xqspi->refclk);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user