fixed svace issues 73/170173/1 accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified_hotfix tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0_hotfix accepted/tizen/5.0/unified/20181102.012003 accepted/tizen/5.5/unified/20191031.004556 accepted/tizen/5.5/unified/mobile/hotfix/20201027.081118 accepted/tizen/5.5/unified/wearable/hotfix/20201027.122621 accepted/tizen/6.0/unified/20201030.123021 accepted/tizen/6.0/unified/hotfix/20201103.050856 accepted/tizen/6.5/unified/20211028.093157 accepted/tizen/7.0/unified/20221110.061821 accepted/tizen/7.0/unified/hotfix/20221116.104328 accepted/tizen/unified/20180220.064112 submit/tizen/20180219.073606 submit/tizen_5.0/20181101.000001 submit/tizen_5.5/20191031.000009 submit/tizen_5.5_mobile_hotfix/20201026.185101 submit/tizen_5.5_wearable_hotfix/20201026.184301 submit/tizen_6.0/20201029.205101 submit/tizen_6.0_hotfix/20201102.192501 submit/tizen_6.0_hotfix/20201103.114801 submit/tizen_6.5/20211028.161401 tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
authorSejun Park <sejun79.park@samsung.com>
Wed, 14 Feb 2018 02:50:50 +0000 (11:50 +0900)
committerSejun Park <sejun79.park@samsung.com>
Wed, 14 Feb 2018 02:50:50 +0000 (11:50 +0900)
Change-Id: Ia75080d7a040bc646693224978ce57bdf586bd8f

libcsc/csc.c

index d90968e..39e4a95 100755 (executable)
@@ -745,6 +745,7 @@ static CSC_ERRORCODE csc_init_hw(
             ALOGE("%s:: CSC_METHOD_HW can't open HW", __func__);
             free(csc_handle);
             csc_handle = NULL;
+            ret = CSC_ErrorNotInit;
         }
     }
     if (csc_handle)
@@ -1260,8 +1261,12 @@ CSC_ERRORCODE csc_convert(
         return CSC_ErrorNotInit;
 
     if ((csc_handle->csc_method == CSC_METHOD_HW) &&
-        (csc_handle->csc_hw_handle == NULL))
-        csc_init_hw(handle);
+        (csc_handle->csc_hw_handle == NULL)) {
+        ret = csc_init_hw(handle);
+
+        if (ret != CSC_ErrorNone)
+            return ret;
+    }
 
     csc_set_format(csc_handle);
     csc_set_buffer(csc_handle);
@@ -1284,8 +1289,12 @@ CSC_ERRORCODE csc_convert_with_rotation(
         return CSC_ErrorNotInit;
 
     if ((csc_handle->csc_method == CSC_METHOD_HW) &&
-        (csc_handle->csc_hw_handle == NULL))
-        csc_init_hw(handle);
+        (csc_handle->csc_hw_handle == NULL)) {
+        ret = csc_init_hw(handle);
+
+        if (ret != CSC_ErrorNone)
+            return ret;
+    }
 
     csc_set_format(csc_handle);
     csc_set_buffer(csc_handle);