Skip to content

Commit

Permalink
drm/i915/guc: fix NULL vs IS_ERR() checking
Browse files Browse the repository at this point in the history
The intel_engine_create_virtual() function does not return NULL.  It
returns error pointers.

Fixes: e5e3217 ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211116114916.GB11936@kili
  • Loading branch information
Dan Carpenter authored and John Harrison committed Nov 16, 2021
1 parent 9a7fc95 commit fc12b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -3354,8 +3354,8 @@ guc_create_parallel(struct intel_engine_cs **engines,

ce = intel_engine_create_virtual(siblings, num_siblings,
FORCE_VIRTUAL);
if (!ce) {
err = ERR_PTR(-ENOMEM);
if (IS_ERR(ce)) {
err = ERR_CAST(ce);
goto unwind;
}

Expand Down

0 comments on commit fc12b70

Please sign in to comment.