From: Dan Carpenter Date: Thu, 17 Dec 2015 12:40:20 +0000 (+0300) Subject: drm/vc4: fix an error code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5645e785cea2f33acdc5e5cee62b3ce8a00f1169;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;