drm/tilcdc: remove unnecessary state->fb check
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 29 Apr 2020 10:42:33 +0000 (13:42 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 19 May 2020 06:56:58 +0000 (09:56 +0300)
tilcdc_plane_atomic_check() exits if state->fb == NULL, so no need to
check it again later.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-2-tomi.valkeinen@ti.com
Reviewed-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_plane.c

index e2090020b3a0d3491a6c3dde05ca45c72f775ebf..0d09b31ae75949b941ad12129b6871e47a4b10bd 100644 (file)
@@ -62,8 +62,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane,
                return -EINVAL;
        }
 
-       if (state->fb && old_state->fb &&
-           state->fb->format != old_state->fb->format) {
+       if (old_state->fb && state->fb->format != old_state->fb->format) {
                dev_dbg(plane->dev->dev,
                        "%s(): pixel format change requires mode_change\n",
                        __func__);