]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/armada: Drop always true condition in atomic_check
authorMaxime Ripard <mripard@kernel.org>
Tue, 30 Sep 2025 10:59:28 +0000 (12:59 +0200)
committerMaxime Ripard <mripard@kernel.org>
Mon, 6 Oct 2025 11:59:10 +0000 (13:59 +0200)
The drm_atomic_state pointer passed to atomic_check is always valid, so
checking if it's NULL or not is pointless. Remove the check.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250930-drm-no-more-existing-state-v5-13-eeb9e1287907@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/armada/armada_plane.c

index cc47c032dbc151a463cbd0b0d048c74c2828f253..12a01a51d6fb7dc0e9264d4e4bf6dc4e1b472cb6 100644 (file)
@@ -94,12 +94,7 @@ int armada_drm_plane_atomic_check(struct drm_plane *plane,
                return 0;
        }
 
-       if (state)
-               crtc_state = drm_atomic_get_existing_crtc_state(state,
-                                                               crtc);
-       else
-               crtc_state = crtc->state;
-
+       crtc_state = drm_atomic_get_existing_crtc_state(state, crtc);
        ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
                                                  0,
                                                  INT_MAX, true, false);