Commit 5d39b157 authored by Daniel Vetter's avatar Daniel Vetter

drm/vkms: plane_state->fb iff plane_state->crtc

Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Reviewed-by: default avatarRodrigo Siqueira <rodrigosiqueira@gmail.com>
Tested-by: default avatarRodrigo Siqueira <rodrigosiqueira@gmail.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-9-daniel.vetter@ffwll.ch
parent 021b7c7b
...@@ -117,7 +117,7 @@ static int vkms_plane_atomic_check(struct drm_plane *plane, ...@@ -117,7 +117,7 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
bool can_position = false; bool can_position = false;
int ret; int ret;
if (!state->fb | !state->crtc) if (!state->fb || WARN_ON(!state->crtc))
return 0; return 0;
crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc); crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment