static void __mm_util_destroy_color_image(mm_image_info_s *image)
{
- if (image == NULL) {
- image_util_error("[ERROR] - image");
- return;
- }
+ image_util_retm_if((image == NULL), "Invalid handle");
IMAGE_UTIL_SAFE_FREE(image->data);
IMAGE_UTIL_SAFE_FREE(image);
src_width = handle->src->width;
src_height = handle->src->height;
src_format = handle->src->color;
- if (dst_buf[src_index] == NULL) {
- image_util_error("[multi func] memory allocation error");
- return IMAGE_UTIL_ERROR_INVALID_OPERATION;
- }
+
+ image_util_retvm_if(dst_buf[src_index] == NULL, IMAGE_UTIL_ERROR_INVALID_OPERATION, "[multi func] memory allocation error");
+
memcpy(dst_buf[src_index], handle->src->data, handle->src->size);
if (handle->set_crop) {