Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbe2e11a authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Do not return -1 from shrinker when nr_to_scan == 0



The error code is only expected during the actual pruning and not during
the first measurement (nr_to_scan == 0) pass.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 4a684a41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4994,7 +4994,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker,
	int cnt;

	if (!mutex_trylock(&dev->struct_mutex))
		return nr_to_scan ? 0 : -1;
		return 0;

	/* "fast-path" to count number of available objects */
	if (nr_to_scan == 0) {