]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 8 Apr 2021 09:25:59 +0000 (17:25 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 8 Apr 2021 14:08:52 +0000 (15:08 +0100)
When platform_get_irq() fails, a pairing PM usage counter
increment is needed to keep the counter balanced. It's the
same for the following error paths.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20210408092559.3824-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynqmp-gqspi.c

index c8fa6ee18ae77b31ef860d31a8b46aa878cd544b..95963a2de64aae679405a314491cdf6e7893ce14 100644 (file)
@@ -1197,6 +1197,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
        return 0;
 
 clk_dis_all:
+       pm_runtime_get_noresume(&pdev->dev);
        pm_runtime_set_suspended(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
        clk_disable_unprepare(xqspi->refclk);