[COMMON] fimc-is2: do not print false alram of group_stop
authorWooyeon Kim <wooy88.kim@samsung.com>
Wed, 17 Apr 2019 05:47:10 +0000 (14:47 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Wed, 7 Aug 2019 12:59:55 +0000 (21:59 +0900)
 when closing camera, make do not print a error return

 PR JIRA ID: CPR-972

Change-Id: Ic2284c230bbda6531135ced1e9a2d1c2b7484f8e
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c

index 93aedba6ad419b5370fc64eba754c7e28862a33e..bcdbfd915fa982cc11e851ac85a45a6d274ddda9 100644 (file)
@@ -4293,9 +4293,15 @@ static int fimc_is_ischain_paf_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_paf;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -4583,9 +4589,15 @@ static int fimc_is_ischain_3aa_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_3aa;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -4872,9 +4884,15 @@ static int fimc_is_ischain_isp_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_isp;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -5164,9 +5182,15 @@ static int fimc_is_ischain_dis_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_dis;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -5456,9 +5480,15 @@ static int fimc_is_ischain_dcp_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_dcp;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -5749,9 +5779,15 @@ static int fimc_is_ischain_mcs_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_mcs;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }
 
@@ -6034,9 +6070,15 @@ static int fimc_is_ischain_vra_stop(void *qdevice,
        groupmgr = device->groupmgr;
        group = &device->group_vra;
 
+       if (!test_bit(FIMC_IS_GROUP_INIT, &group->state))
+               goto p_err;
+
        ret = fimc_is_group_stop(groupmgr, group);
        if (ret) {
-               merr("fimc_is_group_stop is fail(%d)", device, ret);
+               if (ret == -EPERM)
+                       ret = 0;
+               else
+                       merr("fimc_is_group_stop is fail(%d)", device, ret);
                goto p_err;
        }