drm: Remove redundant NULL check during atomic plane commit
authorImre Deak <[email protected]>
Wed, 26 Apr 2017 13:40:13 +0000 (16:40 +0300)
committerVille Syrjälä <[email protected]>
Mon, 8 May 2017 15:44:24 +0000 (18:44 +0300)
plane_state can't be NULL anywhere in this function, so the NULL check
at the end is redundant, remove it.

Cc: [email protected]
Signed-off-by: Imre Deak <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
drivers/gpu/drm/drm_plane_helper.c

index 9854a503e20105fd70edd68fbd96c83e3bef95a5..2c27f6f5a6689a98a646935be87fbed9cb10d24c 100644 (file)
@@ -511,12 +511,10 @@ int drm_plane_helper_commit(struct drm_plane *plane,
        if (plane_funcs->cleanup_fb)
                plane_funcs->cleanup_fb(plane, plane_state);
 out:
-       if (plane_state) {
-               if (plane->funcs->atomic_destroy_state)
-                       plane->funcs->atomic_destroy_state(plane, plane_state);
-               else
-                       drm_atomic_helper_plane_destroy_state(plane, plane_state);
-       }
+       if (plane->funcs->atomic_destroy_state)
+               plane->funcs->atomic_destroy_state(plane, plane_state);
+       else
+               drm_atomic_helper_plane_destroy_state(plane, plane_state);
 
        return ret;
 }