[COMMON] fimc-is2: Modify a vra kthread_stop error handling
authordan huh <dan.huh@samsung.com>
Mon, 9 Jul 2018 02:05:46 +0000 (11:05 +0900)
committerdan huh <dan.huh@samsung.com>
Tue, 10 Jul 2018 01:03:26 +0000 (10:03 +0900)
- kthread_stop check has to success to kthread_run
- when kthread_run fail, don't has to kthread_stop

PR JIRA ID: CPR-44

Change-Id: Ia9e46173971853f2709cbd39d2345e11fcc9d242
Signed-off-by: dan huh <dan.huh@samsung.com>
drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-vra.c

index bd07be96f43944deaf2bfabe5822d421473b8fc1..28809ef0d2b2ac5f0eb7514e5d352eb7ea19a8c0 100644 (file)
@@ -1007,7 +1007,7 @@ int fimc_is_lib_vra_frame_work_final(struct fimc_is_lib_vra *lib_vra)
                return ret;
        }
 
-       if (lib_vra->task_vra.task != NULL) {
+       if (!IS_ERR_OR_NULL(lib_vra->task_vra.task)) {
                ret = kthread_stop(lib_vra->task_vra.task);
                if (ret)
                        err_lib("kthread_stop fail (%d)", ret);