aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk> 2019-05-30 09:23:58 +0100
committerGravatar Chris Wilson <chris@chris-wilson.co.uk> 2019-05-31 09:00:49 +0100
commitf2d1315895ca5a4747abd3f6ece66fc25613405a (patch)
treee53270eded367facd97e4f04673b1b84672421d2 /drivers
parentdrm/i915: Split off pci_driver.remove() tail to drm_driver.release() (diff)
downloadlinux-f2d1315895ca5a4747abd3f6ece66fc25613405a.tar.gz
linux-f2d1315895ca5a4747abd3f6ece66fc25613405a.tar.bz2
linux-f2d1315895ca5a4747abd3f6ece66fc25613405a.zip
drm/i915: Drop check for non-NULL entry in llist_for_each_entry_safe
Since the next entry is an offset from a pointer, it can not be NULL. For simplicity, drop the extra conditional before calling cond_resched() Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190530082358.13663-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
index f064876f1214..55e79fdb81aa 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
@@ -248,8 +248,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
GEM_BUG_ON(!atomic_read(&i915->mm.free_count));
atomic_dec(&i915->mm.free_count);
- if (on)
- cond_resched();
+ cond_resched();
}
intel_runtime_pm_put(i915, wakeref);
}