From: Rob Clark Date: Wed, 21 Mar 2012 21:40:23 +0000 (-0500) Subject: staging: omap/drm: dmm should return proper errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c3a4dc3d01547103a81957d41f105d462f42c4d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: omap/drm: dmm should return proper errors Minor error path clean-up. Signed-off-by: Rob Clark Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c index 1ecb6a73d790..9d83060e753a 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.c +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c @@ -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); if (ret) { kfree(block); - return 0; + return ERR_PTR(-ENOMEM); } /* add to allocation list */ @@ -371,7 +371,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);