Skip to content

Commit

Permalink
drm/i915/guc: Assert ctch->vma is allocated
Browse files Browse the repository at this point in the history
Silence smatch by demonstrating that ctch->vma is allocated
following a successful chch_init()

drivers/gpu/drm/i915/intel_guc_ct.c:204 ctch_open() error:
 we previously assumed 'ctch->vma' could be null (see line 197)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106135154.52520-1-michal.wajdeczko@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Michal Wajdeczko authored and Chris Wilson committed Nov 6, 2017
1 parent 856efd2 commit 1c5a907
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/intel_guc_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static int ctch_open(struct intel_guc *guc,
err = ctch_init(guc, ctch);
if (unlikely(err))
goto err_out;
GEM_BUG_ON(!ctch->vma);
}

/* vma should be already allocated and map'ed */
Expand Down

0 comments on commit 1c5a907

Please sign in to comment.