drm/damage-helper: Use NULL instead of 0
authorFabio Estevam <festevam@gmail.com>
Mon, 27 May 2019 18:37:14 +0000 (15:37 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 May 2019 07:03:06 +0000 (09:03 +0200)
The 'clips' member is a pointer, so assign NULL instead of 0.

This fixes the following sparse warning:

drivers/gpu/drm/drm_damage_helper.c:289:31: warning: Using plain integer as NULL pointer

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527183714.11168-1-festevam@gmail.com
drivers/gpu/drm/drm_damage_helper.c

index ee67c96841fa19ae86a96bab6c838f7c8be0e4cc..8230dac01a89bea5844524514d3b2fb767a26a47 100644 (file)
@@ -286,7 +286,7 @@ drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,
        iter->plane_src.y2 = (state->src.y2 >> 16) + !!(state->src.y2 & 0xFFFF);
 
        if (!iter->clips || !drm_rect_equals(&state->src, &old_state->src)) {
-               iter->clips = 0;
+               iter->clips = NULL;
                iter->num_clips = 0;
                iter->full_update = true;
        }