From: YoungJun Cho Date: Mon, 14 Nov 2016 07:06:54 +0000 (+0900) Subject: tbm_bufmgr_sprd: clean up tbm_sprd_bo_size() X-Git-Tag: accepted/tizen/3.0/mobile/20161116.021432~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35d0f6aed0142311d1390332285a433d4b3ee906;p=platform%2Fadaptation%2Fspreadtrum%2Flibtbm-sprd.git tbm_bufmgr_sprd: clean up tbm_sprd_bo_size() This patch cleans up tbm_sprd_bo_size(). - The tbm_exynos_bo_size() checkes whether bo_exynos is NULL or not. So it's safer to check also. Change-Id: Ie328c166a784a9e483f416707c512f79cc18cbf6 Signed-off-by: YoungJun Cho --- diff --git a/src/tbm_bufmgr_sprd.c b/src/tbm_bufmgr_sprd.c index b93e42e..29eba0b 100644 --- a/src/tbm_bufmgr_sprd.c +++ b/src/tbm_bufmgr_sprd.c @@ -828,6 +828,7 @@ tbm_sprd_bo_size(tbm_bo bo) tbm_bo_sprd bo_sprd; bo_sprd = (tbm_bo_sprd)tbm_backend_get_bo_priv(bo); + SPRD_RETURN_VAL_IF_FAIL(bo_sprd != NULL, 0); return bo_sprd->size; }