mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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:
parent
f55532a0c0
commit
ba412e343d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user