drm/modes: Prevent division by zero htotal
[linux-2.6-block.git] / drivers / gpu / drm / drm_atomic_state_helper.c
index 60bd7d708e354a9b03d19be1ea1427256fc6fabc..4985384e51f6e5cc7308efc670d08a05e92ff4ec 100644 (file)
@@ -241,6 +241,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
 
        state->fence = NULL;
        state->commit = NULL;
+       state->fb_damage_clips = NULL;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
 
@@ -285,6 +286,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
 
        if (state->commit)
                drm_crtc_commit_put(state->commit);
+
+       drm_property_blob_put(state->fb_damage_clips);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);