pass: Handle each h/w resource as the independent element 87/137487/5
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 6 Jul 2017 04:49:38 +0000 (13:49 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 7 Jul 2017 05:34:04 +0000 (14:34 +0900)
PASS handles each h/w resource independently. When PASS fail
to initialize or load the library, it should not affect anything else.

So, this patch tries to initialize/exit each h/w resource continuously
when other h/w resource faild to initialize/exit because each h/w resource
is independent.

Change-Id: Ibc0d40347c6b6dbbf4c2576659d937e171fa362e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass.c

index 00c4e57fbe875d2206fa3b348323ad80e0fb11b7..7ca0dcacae5f4a14f2018e505217abe6a367d61c 100644 (file)
@@ -250,14 +250,14 @@ static int pass_init_done(void *data, void *user_data)
                if (ret < -1) {
                        _E("Cannot get the pass '%s' resource (%d)\n",
                                        cdata->res_name, ret);
-                       return ret;
+                       continue;
                }
 
                ret = pass_resource_init(policy);
                if (ret < 0) {
                        _E("Cannot initialize the pass '%s' resource (%d)\n",
                                        cdata->res_name, ret);
-                       return ret;
+                       continue;
                }
        }
 
@@ -277,19 +277,18 @@ static int pass_exit_done(void)
                if (ret < 0) {
                        _E("Cannot exit the pass '%s' resource (%d)\n",
                                        cdata->res_name, ret);
-                       goto exit;
+                       continue;
                }
 
                ret = pass_put_resource(pass_res);
                if (ret < 0) {
                        _E("Cannot put the pass '%s' resource (%d)\n",
                                        cdata->res_name, ret);
-                       goto exit;
+                       continue;
                }
        }
 
-exit:
-       return ret;
+       return 0;
 }
 
 /*