From 52b18e3a5a4db51e3b30bdb0ed4295595523105a Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Wed, 26 Apr 2017 16:40:13 +0300 Subject: [PATCH] drm: Remove redundant NULL check during atomic plane commit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Link: http://patchwork.freedesktop.org/patch/msgid/1493214013-15580-9-git-send-email-imre.deak@intel.com Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_plane_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 9854a503e201..2c27f6f5a668 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -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; } -- 2.20.1