Skip to content

Commit ba412e3

Browse files
Shubhrajyoti Dattabroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent f55532a commit ba412e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/spi/spi-zynqmp-gqspi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master)
360360

361361
ret = clk_enable(xqspi->refclk);
362362
if (ret)
363-
goto clk_err;
363+
return ret;
364364

365365
ret = clk_enable(xqspi->pclk);
366366
if (ret)
@@ -369,6 +369,7 @@ static int zynqmp_prepare_transfer_hardware(struct spi_master *master)
369369
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK);
370370
return 0;
371371
clk_err:
372+
clk_disable(xqspi->refclk);
372373
return ret;
373374
}
374375

0 commit comments

Comments
 (0)