File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ i915_gem_shrink(struct i915_gem_ww_ctx *ww,
118
118
intel_wakeref_t wakeref = 0 ;
119
119
unsigned long count = 0 ;
120
120
unsigned long scanned = 0 ;
121
- int err ;
121
+ int err = 0 ;
122
122
123
123
/* CHV + VTD workaround use stop_machine(); need to trylock vm->mutex */
124
124
bool trylock_vm = !ww && intel_vm_no_concurrent_access_wa (i915 );
@@ -242,12 +242,15 @@ i915_gem_shrink(struct i915_gem_ww_ctx *ww,
242
242
list_splice_tail (& still_in_list , phase -> list );
243
243
spin_unlock_irqrestore (& i915 -> mm .obj_lock , flags );
244
244
if (err )
245
- return err ;
245
+ break ;
246
246
}
247
247
248
248
if (shrink & I915_SHRINK_BOUND )
249
249
intel_runtime_pm_put (& i915 -> runtime_pm , wakeref );
250
250
251
+ if (err )
252
+ return err ;
253
+
251
254
if (nr_scanned )
252
255
* nr_scanned += scanned ;
253
256
return count ;
You can’t perform that action at this time.
0 commit comments