From 5645e785cea2f33acdc5e5cee62b3ce8a00f1169 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 17 Dec 2015 15:40:20 +0300 Subject: [PATCH] drm/vc4: fix an error code "exec->exec_bo" is NULL at this point so this code returns success. We want to return -ENOMEM. Fixes: d5b1a78a772f ('drm/vc4: Add support for drawing 3D frames.') Signed-off-by: Dan Carpenter Reviewed-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 1928c0a454be..48ce30a6f4b5 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -580,7 +580,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) bo = vc4_bo_create(dev, exec_size, true); if (!bo) { DRM_ERROR("Couldn't allocate BO for binning\n"); - ret = PTR_ERR(exec->exec_bo); + ret = -ENOMEM; goto fail; } exec->exec_bo = &bo->base; -- 2.20.1