This patch cleans up tbm_surface_internal_get_info().
There is a missed error routine.
Change-Id: I31be6bcb1b974c7ca7e6016b4a0879a766ab3089
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
}
}
} else {
- for (i = 0; i < surf->num_bos; i++)
+ for (i = 0; i < surf->num_bos; i++) {
bo_handles[i] = tbm_bo_get_handle(surf->bos[i], TBM_DEVICE_CPU);
+ if (bo_handles[i].ptr == NULL) {
+ TBM_TRACE("error: tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+ _tbm_surface_mutex_unlock();
+ return 0;
+ }
+ }
}
for (i = 0; i < surf->info.num_planes; i++) {