* HW tries to write past the end of one.
*/
- mutex_lock(>->i915->drm.struct_mutex);
-
fixme = kernel_context(gt->i915);
- if (IS_ERR(fixme)) {
- err = PTR_ERR(fixme);
- goto unlock;
- }
+ if (IS_ERR(fixme))
+ return PTR_ERR(fixme);
for_each_engine(engine, gt->i915, id) {
struct {
}
kernel_context_close(fixme);
-unlock:
- mutex_unlock(>->i915->drm.struct_mutex);
return err;
}
if (IS_ERR(file))
return PTR_ERR(file);
- mutex_lock(>->i915->drm.struct_mutex);
-
fixme = live_context(gt->i915, file);
if (IS_ERR(fixme)) {
err = PTR_ERR(fixme);
- goto unlock;
+ goto out_file;
}
for_each_engine(engine, gt->i915, id) {
break;
}
-unlock:
- mutex_unlock(>->i915->drm.struct_mutex);
+out_file:
mock_file_free(gt->i915, file);
return err;
}
if (IS_ERR(file))
return PTR_ERR(file);
- mutex_lock(>->i915->drm.struct_mutex);
-
fixme = live_context(gt->i915, file);
if (IS_ERR(fixme)) {
err = PTR_ERR(fixme);
- goto unlock;
+ goto out_file;
}
for_each_engine(engine, gt->i915, id) {
break;
}
-unlock:
- mutex_unlock(>->i915->drm.struct_mutex);
+out_file:
mock_file_free(gt->i915, file);
return err;
}