}
*camera = (camera_h)pc;
-
- /* get display interface handle */
- if (mm_display_interface_init(&pc->cb_info->dp_interface) != MM_ERROR_NONE)
- CAM_LOG_WARNING("display interface init failed");
} else {
goto ErrorExit;
}
CAM_LOG_INFO("Enter - type : %d, display : %p", type, display);
if (type != MM_DISPLAY_TYPE_NONE) {
- /* check display interface handle */
+ /* initialize mm_display_interface if it's NULL. */
if (!cb_info->dp_interface) {
- CAM_LOG_ERROR("display interface not supported");
- return CAMERA_ERROR_NOT_SUPPORTED;
+ if (mm_display_interface_init(&cb_info->dp_interface) != MM_ERROR_NONE) {
+ CAM_LOG_ERROR("display interface init failed");
+ return CAMERA_ERROR_NOT_SUPPORTED;
+ }
}
mm_ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &dp_info->parent_id);