Skip to content

Commit 4809a01

Browse files
en4bzzackr
authored andcommitted
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: 75c3e8a ("drm/vmwgfx: Trigger a modeset when the screen moves") Reviewed-by: Zack Rusin <[email protected]> Reviewed-by: Martin Krastev <[email protected]> Signed-off-by: Zack Rusin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 28a5dfd commit 4809a01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,10 @@ static int vmw_stdu_connector_atomic_check(struct drm_connector *conn,
886886
struct drm_crtc_state *new_crtc_state;
887887

888888
conn_state = drm_atomic_get_connector_state(state, conn);
889+
890+
if (IS_ERR(conn_state))
891+
return PTR_ERR(conn_state);
892+
889893
du = vmw_connector_to_stdu(conn);
890894

891895
if (!conn_state->crtc)

0 commit comments

Comments
 (0)