drm/msm: dpu: Remove checks from dpu_plane_destroy_state()
authorSean Paul <seanpaul@chromium.org>
Thu, 4 Oct 2018 18:09:45 +0000 (14:09 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 17:51:30 +0000 (12:51 -0500)
They're not needed.

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index 7ed8f566e0e90951ca8318c242ca765091bdef0a..f7d9bab80dadb07569c5be7e3ced81c5a1abb2e1 100644 (file)
@@ -1191,19 +1191,8 @@ static void dpu_plane_destroy(struct drm_plane *plane)
 static void dpu_plane_destroy_state(struct drm_plane *plane,
                struct drm_plane_state *state)
 {
-       struct dpu_plane_state *pstate;
-
-       if (!plane || !state) {
-               DPU_ERROR("invalid arg(s), plane %d state %d\n",
-                               plane != 0, state != 0);
-               return;
-       }
-
-       pstate = to_dpu_plane_state(state);
-
        __drm_atomic_helper_plane_destroy_state(state);
-
-       kfree(pstate);
+       kfree(to_dpu_plane_state(state));
 }
 
 static struct drm_plane_state *