diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-12-13 18:26:05 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2019-12-13 20:34:59 +0100 |
commit | 2840f1f0e4175bd0dac292408189332cc597d163 (patch) | |
tree | 3540f1bff622b67acecba99885b7670274085470 /drivers/gpu/drm/atmel-hlcdc | |
parent | drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel (diff) | |
download | linux-2840f1f0e4175bd0dac292408189332cc597d163.tar.xz linux-2840f1f0e4175bd0dac292408189332cc597d163.zip |
drm/atmel: plane_state->fb iff plane_state->crtc
Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Boris Brezillon <bbrezillon@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-3-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/atmel-hlcdc')
-rw-r--r-- | drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |