drm/vmwgfx: Handle possible ENOMEM in vmw_stdu_connector_atomic_check
Subsystems (3)
PATCH 1/1 drm/vmwgfx: Handle possible ENOMEM in vmw_stdu_connector_atomic_check
Handle unlikely ENOMEN condition and other errors in vmw_stdu_connector_atomic_check.
Signed-off-by Ian Forbes <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Fixes 75c3e8a26a35 ("drm/vmwgfx: Trigger a modeset when the screen moves")
--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +4 -0
@@ -886,6 +886,10 @@ static int vmw_stdu_connector_atomic_check(struct drm_connector *conn,struct drm_crtc_state *new_crtc_state; conn_state =drm_atomic_get_connector_state (state, conn); + +if (IS_ERR (conn_state)) +return PTR_ERR (conn_state); + du =vmw_connector_to_stdu (conn);if (!conn_state->crtc)
Signature · 1 line
2.34.1
Quoted 27 lines · Ian Forbes
Handle unlikely ENOMEN condition and other errors in
vmw_stdu_connector_atomic_check.Signed-off-by Ian Forbes <[email protected]>Reported-by Dan Carpenter <[email protected]>Fixes 75c3e8a26a35 ("drm/vmwgfx: Trigger a modeset when the screen moves")--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +4
-1@@ -886,6 +886,10 @@ static int vmw_stdu_connector_atomic_check(struct drm_connector *conn,struct drm_crtc_state *new_crtc_state; conn_state =drm_atomic_get_connector_state (state, conn); + +if (IS_ERR (conn_state)) +return PTR_ERR (conn_state); + du =vmw_connector_to_stdu (conn);if (!conn_state->crtc) --
Quoted 2 lines
2.34.1
Reviewed-by Zack Rusin <[email protected]>
z
LGTM.
Reviewed-by Martin Krastev <[email protected]>
Regards,
Martin
Quoted 29 lines · Ian Forbes
Handle unlikely ENOMEN condition and other errors in
vmw_stdu_connector_atomic_check.Signed-off-by Ian Forbes <[email protected]>Reported-by Dan Carpenter <[email protected]>Fixes 75c3e8a26a35 ("drm/vmwgfx: Trigger a modeset when the screen moves")--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +4
-1@@ -886,6 +886,10 @@ static int vmw_stdu_connector_atomic_check(struct drm_connector *conn,struct drm_crtc_state *new_crtc_state; conn_state =drm_atomic_get_connector_state (state, conn); + +if (IS_ERR (conn_state)) +return PTR_ERR (conn_state); + du =vmw_connector_to_stdu (conn);if (!conn_state->crtc) --2.34.1