From: Changyeon Lee Date: Thu, 14 Oct 2021 05:29:10 +0000 (+0900) Subject: tbm_bo: fix wrong last error when tbm_bo_map is failed X-Git-Tag: submit/tizen/20211101.080403~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f89cb397e90d48d341e9544eeda57bc9f3bf39b;p=platform%2Fcore%2Fuifw%2Flibtbm.git tbm_bo: fix wrong last error when tbm_bo_map is failed Change-Id: I85b46f18be8b1850c83c10c0c298ea5cc7c3e780 --- diff --git a/src/tbm_bo.c b/src/tbm_bo.c index 1987327..02f4619 100644 --- a/src/tbm_bo.c +++ b/src/tbm_bo.c @@ -376,8 +376,8 @@ tbm_bo_map(tbm_bo bo, int device, int opt) if (bo_handle.ptr == NULL) { /* LCOV_EXCL_START */ TBM_ERR("error: fail to map bo:%p error:%d\n", bo, error); - _tbm_set_last_result(error); _tbm_bo_unlock(bo); + _tbm_set_last_result(error); _tbm_bufmgr_mutex_unlock(); return (tbm_bo_handle) NULL; /* LCOV_EXCL_STOP */