From 0e9c093db00f19ed4d0f7333656b3aab332c484c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Mon, 13 Feb 2023 17:23:47 +0100 Subject: [PATCH] gpu: drm: apple: Fix pm_runtime_enable/disable balance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin PoviĊĦer --- drivers/gpu/drm/apple/dcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/apple/dcp.c b/drivers/gpu/drm/apple/dcp.c index f95335828ffe..f3e79d390af8 100644 --- a/drivers/gpu/drm/apple/dcp.c +++ b/drivers/gpu/drm/apple/dcp.c @@ -620,7 +620,10 @@ static int dcp_platform_probe(struct platform_device *pdev) if (ret) dev_err(dev, "pm_runtime_put_sync_suspend failed: %d\n", ret); - return component_add(&pdev->dev, &dcp_comp_ops); + ret = component_add(&pdev->dev, &dcp_comp_ops); + if (ret) + pm_runtime_enable(dev); + return ret; } static int dcp_platform_remove(struct platform_device *pdev) -- 2.37.0 (Apple Git-136)