Commit 4f865a74 authored by Daniel Vetter's avatar Daniel Vetter

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

Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Acked-by: default avatarCK Hu <ck.hu@mediatek.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-5-daniel.vetter@ffwll.ch
parent e529878e
...@@ -87,7 +87,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane, ...@@ -87,7 +87,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
if (!fb) if (!fb)
return 0; return 0;
if (!state->crtc) if (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