[PATCH] staging: omap/drm: dmm should return proper errors
Rob Clark
rob.clark at linaro.org
Wed Mar 21 14:40:23 PDT 2012
From: Rob Clark <rob at ti.com>
Minor error path clean-up.
Signed-off-by: Rob Clark <rob at ti.com>
---
drivers/staging/omapdrm/omap_dmm_tiler.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c
index 852d944..33c1d54 100644
--- a/drivers/staging/omapdrm/omap_dmm_tiler.c
+++ b/drivers/staging/omapdrm/omap_dmm_tiler.c
@@ -345,7 +345,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, uint16_t w,
ret = tcm_reserve_2d(containers[fmt], w, h, align, &block->area);
if (ret) {
kfree(block);
- return 0;
+ return ERR_PTR(-ENOMEM);
}
/* add to allocation list */
@@ -369,7 +369,7 @@ struct tiler_block *tiler_reserve_1d(size_t size)
if (tcm_reserve_1d(containers[TILFMT_PAGE], num_pages,
&block->area)) {
kfree(block);
- return 0;
+ return ERR_PTR(-ENOMEM);
}
spin_lock(&omap_dmm->list_lock);
--
1.7.5.4
More information about the dri-devel
mailing list