Skip to content

Commit 4246560

Browse files
matt-auldlucasdemarchi
authored andcommitted
drm/xe/guc_submit: fix xa_store() error checking
Looks like we are meant to use xa_err() to extract the error encoded in the ptr. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Badal Nilawar <[email protected]> Cc: <[email protected]> # v6.8+ Reviewed-by: Badal Nilawar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit f040327) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent e863781 commit 4246560

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ static void __release_guc_id(struct xe_guc *guc, struct xe_exec_queue *q, u32 xa
393393
static int alloc_guc_id(struct xe_guc *guc, struct xe_exec_queue *q)
394394
{
395395
int ret;
396-
void *ptr;
397396
int i;
398397

399398
/*
@@ -413,12 +412,10 @@ static int alloc_guc_id(struct xe_guc *guc, struct xe_exec_queue *q)
413412
q->guc->id = ret;
414413

415414
for (i = 0; i < q->width; ++i) {
416-
ptr = xa_store(&guc->submission_state.exec_queue_lookup,
417-
q->guc->id + i, q, GFP_NOWAIT);
418-
if (IS_ERR(ptr)) {
419-
ret = PTR_ERR(ptr);
415+
ret = xa_err(xa_store(&guc->submission_state.exec_queue_lookup,
416+
q->guc->id + i, q, GFP_NOWAIT));
417+
if (ret)
420418
goto err_release;
421-
}
422419
}
423420

424421
return 0;

0 commit comments

Comments
 (0)