Commit 1c3a4dc3 authored by Rob Clark's avatar Rob Clark Committed by Greg Kroah-Hartman

staging: omap/drm: dmm should return proper errors

Minor error path clean-up.
Signed-off-by: default avatarRob Clark <rob@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68a75f3f
...@@ -347,7 +347,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, uint16_t w, ...@@ -347,7 +347,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); ret = tcm_reserve_2d(containers[fmt], w, h, align, &block->area);
if (ret) { if (ret) {
kfree(block); kfree(block);
return 0; return ERR_PTR(-ENOMEM);
} }
/* add to allocation list */ /* add to allocation list */
...@@ -371,7 +371,7 @@ struct tiler_block *tiler_reserve_1d(size_t size) ...@@ -371,7 +371,7 @@ struct tiler_block *tiler_reserve_1d(size_t size)
if (tcm_reserve_1d(containers[TILFMT_PAGE], num_pages, if (tcm_reserve_1d(containers[TILFMT_PAGE], num_pages,
&block->area)) { &block->area)) {
kfree(block); kfree(block);
return 0; return ERR_PTR(-ENOMEM);
} }
spin_lock(&omap_dmm->list_lock); spin_lock(&omap_dmm->list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment