File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1530,22 +1530,26 @@ static int live_busywait_preempt(void *arg)
1530
1530
struct drm_i915_gem_object * obj ;
1531
1531
struct i915_vma * vma ;
1532
1532
enum intel_engine_id id ;
1533
- int err = - ENOMEM ;
1534
1533
u32 * map ;
1534
+ int err ;
1535
1535
1536
1536
/*
1537
1537
* Verify that even without HAS_LOGICAL_RING_PREEMPTION, we can
1538
1538
* preempt the busywaits used to synchronise between rings.
1539
1539
*/
1540
1540
1541
1541
ctx_hi = kernel_context (gt -> i915 , NULL );
1542
- if (!ctx_hi )
1543
- return - ENOMEM ;
1542
+ if (IS_ERR (ctx_hi ))
1543
+ return PTR_ERR (ctx_hi );
1544
+
1544
1545
ctx_hi -> sched .priority = I915_CONTEXT_MAX_USER_PRIORITY ;
1545
1546
1546
1547
ctx_lo = kernel_context (gt -> i915 , NULL );
1547
- if (!ctx_lo )
1548
+ if (IS_ERR (ctx_lo )) {
1549
+ err = PTR_ERR (ctx_lo );
1548
1550
goto err_ctx_hi ;
1551
+ }
1552
+
1549
1553
ctx_lo -> sched .priority = I915_CONTEXT_MIN_USER_PRIORITY ;
1550
1554
1551
1555
obj = i915_gem_object_create_internal (gt -> i915 , PAGE_SIZE );
You can’t perform that action at this time.
0 commit comments