]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Oct 2021 12:33:08 +0000 (15:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:40:17 +0000 (11:40 +0200)
commit 739b4e7756d3301dd673ca517afca46a5f635562 upstream.

Return an error code if msm_dsi_manager_validate_current_config().
Don't return success.

Fixes: 488122863116 ("drm/msm/dsi: Use one connector for dual DSI mode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211001123308.GF2283@kili
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/msm/dsi/dsi.c

index 0d37ae5b310c4a1e3a2c8ac7aef5fc49658b1e4b..a11b98e9900191408041b2959822a346e43077b8 100644 (file)
@@ -206,8 +206,10 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
                goto fail;
        }
 
-       if (!msm_dsi_manager_validate_current_config(msm_dsi->id))
+       if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) {
+               ret = -EINVAL;
                goto fail;
+       }
 
        msm_dsi->encoder = encoder;