diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-09-27 10:35:31 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-06 11:05:50 +0200 |
commit | f0d2e86c1b9ecd9cbe967b94e2f0d197f30cb3e7 (patch) | |
tree | 529b745ad1212289d9102f2660f2ec10da5b33cb /drivers/gpu | |
parent | 15438ab06515b093d61e2f35bb27d21e5e7f966e (diff) | |
download | linux-f0d2e86c1b9ecd9cbe967b94e2f0d197f30cb3e7.tar.bz2 |
drm/atomic: Remove unneeded null check for private objects
It can be seen in drm_atomic_get_private_obj_state() that
ptr will never be NULL, so skip the check for that case.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170927083532.5756-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 366c56fe5f58..6c9c4a8e09af 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -182,9 +182,6 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state) for (i = 0; i < state->num_private_objs; i++) { struct drm_private_obj *obj = state->private_objs[i].ptr; - if (!obj) - continue; - obj->funcs->atomic_destroy_state(obj, state->private_objs[i].state); state->private_objs[i].ptr = NULL; |