From: Daniel Vetter Date: Fri, 13 Dec 2019 17:26:04 +0000 (+0100) Subject: drm/malidp: plane_state->fb iff plane_state->crtc X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e529878e4bc156ea021791a840b2f43f8fe4840d;p=linux.git drm/malidp: 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: Liviu Dudau Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Liviu Dudau Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-2-daniel.vetter@ffwll.ch --- diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 3c70a53813bf2..37715cc6064e6 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -512,7 +512,7 @@ static int malidp_de_plane_check(struct drm_plane *plane, int i, ret; unsigned int block_w, block_h; - if (!state->crtc || !state->fb) + if (!state->crtc || WARN_ON(!state->fb)) return 0; fb = state->fb;