Message ID | 20211001123308.GF2283@kili (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/3] drm/msm/dsi: Fix an error code in msm_dsi_modeset_init() | expand |
On 01/10/2021 15:33, Dan Carpenter wrote: > Return an error code if msm_dsi_manager_validate_current_config(). > Don't return success. > > Fixes: 8b03ad30e314 ("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> > --- > drivers/gpu/drm/msm/dsi/dsi.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c > index 614dc7f26f2c..75ae3008b68f 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi.c > +++ b/drivers/gpu/drm/msm/dsi/dsi.c > @@ -215,8 +215,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; > >
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 614dc7f26f2c..75ae3008b68f 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -215,8 +215,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;
Return an error code if msm_dsi_manager_validate_current_config(). Don't return success. Fixes: 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/gpu/drm/msm/dsi/dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)