Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.

Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
Cc: Sam Ravnborg <s...@ravnborg.org>
Cc: Boris Brezillon <bbrezil...@kernel.org>
Cc: Nicolas Ferre <nicolas.fe...@microchip.com>
Cc: Alexandre Belloni <alexandre.bell...@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroc...@microchip.com>
Cc: linux-arm-ker...@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to