summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-07-12 18:51:01 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2017-07-13 19:28:43 +0300
commit178e32c224d2772d3862828dc6f81e4d8953b2f2 (patch)
tree23d55ea9be8720c9f883d1e1ea958edca9d5d63e
parent56a91c4932bd038f3d1f6555ddc349ca4e6933b0 (diff)
downloadlinux-178e32c224d2772d3862828dc6f81e4d8953b2f2.tar.bz2
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 <dhinakaran.pandiyan@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170712155102.26276-2-ville.syrjala@linux.intel.com
-rw-r--r--drivers/gpu/drm/drm_atomic.c3
1 files changed, 1 insertions, 2 deletions
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;