drm/bridge: nwl-dsi: Fix PM disable depth imbalance in nwl_dsi_probe
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 5 Jan 2022 10:48:26 +0000 (10:48 +0000)
committerRobert Foss <robert.foss@linaro.org>
Wed, 5 Jan 2022 17:50:00 +0000 (18:50 +0100)
The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220105104826.1418-1-linmq006@gmail.com
Reviewed-by: Robert Foss <robert.foss@linaro.org>
drivers/gpu/drm/bridge/nwl-dsi.c

index a7389a0facfb4e8f4a54607543c40a2e67aec5b0..fc3ad9fab867792589de9381731e727fc736b53b 100644 (file)
@@ -1206,6 +1206,7 @@ static int nwl_dsi_probe(struct platform_device *pdev)
 
        ret = nwl_dsi_select_input(dsi);
        if (ret < 0) {
+               pm_runtime_disable(dev);
                mipi_dsi_host_unregister(&dsi->dsi_host);
                return ret;
        }