[PATCH 03/10] drm/atmel: plane_state->fb iff plane_state->crtc
Daniel Vetter
daniel.vetter at ffwll.ch
Fri Dec 13 17:26:05 UTC 2019
Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Sam Ravnborg <sam at ravnborg.org>
Cc: Boris Brezillon <bbrezillon at kernel.org>
Cc: Nicolas Ferre <nicolas.ferre at microchip.com>
Cc: Alexandre Belloni <alexandre.belloni at bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches at microchip.com>
Cc: linux-arm-kernel at lists.infradead.org
---
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 034f202dfe8f..40800ec5700a 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -604,7 +604,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
int ret;
int i;
- if (!state->base.crtc || !fb)
+ if (!state->base.crtc || WARN_ON(!fb))
return 0;
crtc_state = drm_atomic_get_existing_crtc_state(s->state, s->crtc);
--
2.24.0
More information about the dri-devel
mailing list