Delete Unreachable code 03/302603/1
authorKwanghoon Son <k.son@samsung.com>
Mon, 11 Dec 2023 06:40:47 +0000 (15:40 +0900)
committerKwanghoon Son <k.son@samsung.com>
Mon, 11 Dec 2023 06:40:47 +0000 (15:40 +0900)
[Issue type] SVACE

Model object already checked and can not be null.

Change-Id: Ie4ce60c6221a8639a1f000966c23f3282b05cad3
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
mv_face/face/src/mv_face_open.cpp

index 2a1f752..34e2d99 100644 (file)
@@ -463,13 +463,6 @@ int mv_face_recognition_model_load_open(const char *file_name, mv_face_recogniti
        }
 
        FaceRecognitionModel *pRecModel = static_cast<FaceRecognitionModel *>(*recognition_model);
-
-       if (!pRecModel) {
-               LOGE("Loading of the face recognition model from file failed. "
-                        "Incorrect Media Vision Face recognition model handle is used");
-               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
-       }
-
        const int ret = pRecModel->load(std::string(file_name));
 
        if (MEDIA_VISION_ERROR_NONE != ret) {
@@ -773,13 +766,6 @@ int mv_face_tracking_model_load_open(const char *file_name, mv_face_tracking_mod
        }
 
        FaceTrackingModel *pTrackModel = static_cast<FaceTrackingModel *>(*tracking_model);
-
-       if (!pTrackModel) {
-               LOGE("Loading of the face tracking model from file failed. "
-                        "Incorrect Media Vision Face tracking model handle is used");
-               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
-       }
-
        const int ret = pTrackModel->load(std::string(file_name));
 
        if (MEDIA_VISION_ERROR_NONE != ret) {