From: Wooyeon Kim Date: Wed, 17 Apr 2019 05:47:10 +0000 (+0900) Subject: [COMMON] fimc-is2: do not print false alram of group_stop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11ba84d07c1418be4310d2ef1250fbcabc114e88;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: do not print false alram of group_stop when closing camera, make do not print a error return PR JIRA ID: CPR-972 Change-Id: Ic2284c230bbda6531135ced1e9a2d1c2b7484f8e Signed-off-by: Wooyeon Kim --- diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c index 93aedba6ad41..bcdbfd915fa9 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c @@ -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; }