We accidentally forget to set the error code here, which means that we return NULL. The callers aren't expecting that and Oops. Fixes: 4ff4b44cbb70 ("drm/i915: Store a direct lookup from object handle to vma") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 39ed58a21fc1..25a73365a5be 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -275,8 +275,10 @@ __create_hw_context(struct drm_i915_private *dev_priv, ctx->vma_lut.ht = kcalloc(ctx->vma_lut.ht_size, sizeof(*ctx->vma_lut.ht), GFP_KERNEL); - if (!ctx->vma_lut.ht) + if (!ctx->vma_lut.ht) { + ret = -ENOMEM; goto err_out; + } INIT_WORK(&ctx->vma_lut.resize, resize_vma_ht); _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx