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

Reviewed-by: Rodrigo Siqueira <rodrigosiqueira@gmail.com>
Tested-by: Rodrigo Siqueira <rodrigosiqueira@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-9-daniel.vetter@ffwll.ch
drivers/gpu/drm/vkms/vkms_plane.c

index 5fc8f85aaf3d8fa817dd2e84e50a0345b3d26d3e..6d31265a2ab7be62697066e6a93529dd389836eb 100644 (file)
@@ -117,7 +117,7 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
        bool can_position = false;
        int ret;
 
-       if (!state->fb | !state->crtc)
+       if (!state->fb || WARN_ON(!state->crtc))
                return 0;
 
        crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);