Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shubhrajyoti Datta and committed by
Mark Brown
ba412e34 f55532a0

+2 -1
+2 -1
drivers/spi/spi-zynqmp-gqspi.c
··· 360 360 361 361 ret = clk_enable(xqspi->refclk); 362 362 if (ret) 363 - goto clk_err; 363 + return ret; 364 364 365 365 ret = clk_enable(xqspi->pclk); 366 366 if (ret) ··· 369 369 zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK); 370 370 return 0; 371 371 clk_err: 372 + clk_disable(xqspi->refclk); 372 373 return ret; 373 374 } 374 375