Commit ba412e34 authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Mark Brown

spi: zynqmp: disable clocks in error paths

The if pclk enable fails the refclk is not disabled.
Fix the same.
Signed-off-by: default avatarShubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f55532a0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment