if (ret != HAL_TBM_ERROR_NONE) {
if (ret != HAL_TBM_ERROR_NOT_SUPPORTED) {
TBM_ERR("error: fail to tbm_bo_alloc_with_format\n");
+ if (error)
+ _tbm_set_last_result(*error);
}
- _tbm_set_last_result(*error);
goto bo_alloc_fail;
}
} else {
if (!bo_data) {
TBM_ERR("error: fail to tbm_bo_alloc_with_format fmt(%s) idx(%d) w(%d) h(%d) mem_types(%s)\n",
FOURCC_STR(format), bo_idx, width, height, _tbm_flag_to_str(flags));
- _tbm_set_last_result(*error);
+ if (error)
+ _tbm_set_last_result(*error);
goto bo_alloc_fail;
}
}
if (ret != HAL_TBM_ERROR_NOT_SUPPORTED) {
TBM_ERR("error: fail to tbm_bo_alloc_with_tiled_format fmt(%s) idx(%d) w(%d) h(%d) flags(%s)\n",
FOURCC_STR(format), bo_idx, width, height, _tbm_flag_to_str(flags));
+ if (error)
+ _tbm_set_last_result(*error);
}
- _tbm_set_last_result(*error);
goto bo_alloc_fail;
}
} else {
if (!bo_data) {
TBM_ERR("error: fail to tbm_bo_alloc_with_tiled_format fmt(%s) idx(%d) w(%d) h(%d) flags(%s)\n",
FOURCC_STR(format), bo_idx, width, height, _tbm_flag_to_str(flags));
- _tbm_set_last_result(*error);
+ if (error)
+ _tbm_set_last_result(*error);
goto bo_alloc_fail;
}
}