]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: Remove redundant NULL check during atomic plane commit
authorImre Deak <imre.deak@intel.com>
Wed, 26 Apr 2017 13:40:13 +0000 (16:40 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
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: dri-devel@lists.freedesktop.org
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1493214013-15580-9-git-send-email-imre.deak@intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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;
 }