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: CK Hu <ck.hu@mediatek.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel 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
This commit is contained in:
parent
e529878e4b
commit
4f865a74c8
|
@ -87,7 +87,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
|
|||
if (!fb)
|
||||
return 0;
|
||||
|
||||
if (!state->crtc)
|
||||
if (WARN_ON(!state->crtc))
|
||||
return 0;
|
||||
|
||||
crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
|
||||
|
|
Loading…
Reference in New Issue