if (bufmgr->use_hal_tbm) {
surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, &error);
if (error == TBM_ERROR_NOT_SUPPORTED) {
- if (error != TBM_ERROR_NONE) {
+ surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags);
+ if (!surf->bos[i]) {
TBM_ERR("fail to alloc bo idx:%d\n", i);
goto alloc_bo_fail;
}
- } else if (error != TBM_ERROR_NONE) {
- TBM_ERR("fail to alloc bo idx:%d\n", i);
- goto alloc_bo_fail;
}
} else if (bufmgr->backend_module_data) {
if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_format) {