Unverified Commit 26569728 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Mark Brown
Browse files

spi: bcm63xx: Fix missing pm_runtime_disable()



The pm_runtime_disable() is missing in the remove function, fix it
by using devm_pm_runtime_enable(), so the pm_runtime_disable() in
the probe error path can also be removed.

Fixes: 2d13f2ff ("spi: bcm63xx-spi: fix pm_runtime")
Cc: stable@vger.kernel.org # v5.13+
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Suggested-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20240819123349.4020472-3-ruanjinjie@huawei.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 909f34f2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -583,13 +583,15 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)

	bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS);

	pm_runtime_enable(&pdev->dev);
	ret = devm_pm_runtime_enable(&pdev->dev);
	if (ret)
		goto out_clk_disable;

	/* register and we are done */
	ret = devm_spi_register_controller(dev, host);
	if (ret) {
		dev_err(dev, "spi register failed\n");
		goto out_pm_disable;
		goto out_clk_disable;
	}

	dev_info(dev, "at %pr (irq %d, FIFOs size %d)\n",
@@ -597,8 +599,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)

	return 0;

out_pm_disable:
	pm_runtime_disable(&pdev->dev);
out_clk_disable:
	clk_disable_unprepare(clk);
out_err: