Skip to content

Commit b45cabf

Browse files
Dan Carpentergregkh
authored andcommitted
drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
[ Upstream commit cbc7f3b ] 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 <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit 75cc23f) Signed-off-by: Rodrigo Vivi <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent e3fe010 commit b45cabf

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
@@ -240,8 +240,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
240240

241241
pfence = xe_preempt_fence_create(q, q->lr.context,
242242
++q->lr.seqno);
243-
if (!pfence) {
244-
err = -ENOMEM;
243+
if (IS_ERR(pfence)) {
244+
err = PTR_ERR(pfence);
245245
goto out_fini;
246246
}
247247

0 commit comments

Comments
 (0)