]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/imx: plane_state->fb iff plane_state->crtc
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Dec 2019 17:26:06 +0000 (18:26 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Jan 2020 14:42:00 +0000 (15:42 +0100)
Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-4-daniel.vetter@ffwll.ch
drivers/gpu/drm/imx/ipuv3-plane.c

index 28826c0aa24a6a550f0133ed82f23a3ddfbc4902..6776ebb3246d4d8c4f1ca1402a778e1e3d2c9183 100644 (file)
@@ -359,7 +359,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
        if (!fb)
                return 0;
 
-       if (!state->crtc)
+       if (WARN_ON(!state->crtc))
                return -EINVAL;
 
        crtc_state =