From: Ville Syrjälä Date: Wed, 12 Jul 2017 15:51:01 +0000 (+0300) Subject: drm/atomic: Remove pointless private object NULL state check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=178e32c224d2772d3862828dc6f81e4d8953b2f2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/atomic: Remove pointless private object NULL state check We will never add private objects with a NULL state into the atomic state, hence checking for that is pointless. Cc: Dhinakaran Pandiyan Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170712155102.26276-2-ville.syrjala@linux.intel.com --- diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 09ca662fcd35..f0482247b31f 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1013,8 +1013,7 @@ drm_atomic_get_private_obj_state(struct drm_atomic_state *state, void *obj, struct __drm_private_objs_state *arr; for (i = 0; i < state->num_private_objs; i++) - if (obj == state->private_objs[i].obj && - state->private_objs[i].obj_state) + if (obj == state->private_objs[i].obj) return state->private_objs[i].obj_state; num_objs = state->num_private_objs + 1;