Skip to contentSkip to conversation

drm/vc4: fix an error code

PATCH In review Dan Carpenter 2 participants 2 messages Dec 17, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 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.')
drivers/gpu/drm/vc4/vc4_gem.c +1 -1
index 2a680d9..98a25b8 100644
@@ -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;
#1 lore raw
Quoted 5 lines · Dan Carpenter

"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.')

Thanks! All 3 of these are Reviewed-by: Eric Anholt <[email protected]>

I've pulled them to my -next tree, which I'll send to Dave once we get the CONFIG_PM_SLEEP bits sorted out.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel