spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime()
[platform/kernel/linux-starfive.git] / drivers / spi / spi-qup.c
index ae4e67f..7d89510 100644 (file)
@@ -1198,8 +1198,10 @@ static int spi_qup_pm_resume_runtime(struct device *device)
                return ret;
 
        ret = clk_prepare_enable(controller->cclk);
-       if (ret)
+       if (ret) {
+               clk_disable_unprepare(controller->iclk);
                return ret;
+       }
 
        /* Disable clocks auto gaiting */
        config = readl_relaxed(controller->base + QUP_CONFIG);