Skip to content

Commit 75cc23f

Browse files
Dan Carpenterrodrigovivi
authored andcommitted
drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
The xe_preempt_fence_create() function returns error pointers. It never returns NULL. Update the error checking to match. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/aJTMBdX97cof_009@stanley.mountain Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent d4c3ed9 commit 75cc23f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
224224

225225
pfence = xe_preempt_fence_create(q, q->lr.context,
226226
++q->lr.seqno);
227-
if (!pfence) {
228-
err = -ENOMEM;
227+
if (IS_ERR(pfence)) {
228+
err = PTR_ERR(pfence);
229229
goto out_fini;
230230
}
231231

0 commit comments

Comments
 (0)