We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fca61 commit 8332e66Copy full SHA for 8332e66
drivers/spi/spi-zynq-qspi.c
@@ -379,12 +379,21 @@ static int zynq_qspi_setup_op(struct spi_device *spi)
379
{
380
struct spi_controller *ctlr = spi->controller;
381
struct zynq_qspi *qspi = spi_controller_get_devdata(ctlr);
382
+ int ret;
383
384
if (ctlr->busy)
385
return -EBUSY;
386
- clk_enable(qspi->refclk);
387
- clk_enable(qspi->pclk);
+ ret = clk_enable(qspi->refclk);
388
+ if (ret)
389
+ return ret;
390
+
391
+ ret = clk_enable(qspi->pclk);
392
+ if (ret) {
393
+ clk_disable(qspi->refclk);
394
395
+ }
396
397
zynq_qspi_write(qspi, ZYNQ_QSPI_ENABLE_OFFSET,
398
ZYNQ_QSPI_ENABLE_ENABLE_MASK);
399
0 commit comments