From: Michal Wajdeczko Date: Mon, 6 Nov 2017 13:51:54 +0000 (+0000) Subject: drm/i915/guc: Assert ctch->vma is allocated X-Git-Tag: android-x86-8.1-r1~365^2~46^2~1193 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1c5a907180365d0842c17fb15977ad426d429c14;p=android-x86%2Fkernel.git drm/i915/guc: Assert ctch->vma is allocated 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 Cc: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171106135154.52520-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/intel_guc_ct.c b/drivers/gpu/drm/i915/intel_guc_ct.c index c4cbec140101..24ad55752396 100644 --- a/drivers/gpu/drm/i915/intel_guc_ct.c +++ b/drivers/gpu/drm/i915/intel_guc_ct.c @@ -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 */