drm/vc4: fix an error code
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Dec 2015 12:40:20 +0000 (15:40 +0300)
committerEric Anholt <eric@anholt.net>
Thu, 17 Dec 2015 19:40:30 +0000 (11:40 -0800)
"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 <dan.carpenter@oracle.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_gem.c

index 1928c0a454bee5f48bc444b6a9d5846299cbf7ab..48ce30a6f4b5cebb21348c1148d85a8c2450e45f 100644 (file)
@@ -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;