From 2f89cb397e90d48d341e9544eeda57bc9f3bf39b Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 14 Oct 2021 14:29:10 +0900 Subject: [PATCH] tbm_bo: fix wrong last error when tbm_bo_map is failed Change-Id: I85b46f18be8b1850c83c10c0c298ea5cc7c3e780 --- src/tbm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.7.4