pass: Fix bug to check return value of pass_get_resource() 18/139918/1
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 14 Jul 2017 01:48:15 +0000 (10:48 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 21 Jul 2017 05:17:27 +0000 (14:17 +0900)
The commit 0e039c5ce2677 ("pass: hal: Modify the definition of
pass_get/put_resource()") add the wrong code related to checking
the return value of pass_get_resource(). This patch fixes the bug
of checking the return value of pass_get_resource().

Change-Id: Ia9704ee96ddec0eecc183fad96fd8583a46b47f9
Fixes: 0e039c5ce2677 ("pass: hal: Modify the definition of pass_get/put_resource()")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass.c

index 408120f6b30653a2ef405da51cee960297a470b8..b0ab1b2fe02d07d5ed15d3c74f72ccbdfa267fc9 100644 (file)
@@ -241,7 +241,7 @@ static int pass_init_done(void *data, void *user_data)
                struct pass_conf_data *cdata = &g_pass.res[i].cdata;
 
                ret = pass_get_resource(res);
-               if (ret < -1) {
+               if (ret < 0) {
                        _E("Cannot get the pass '%s' resource (%d)\n",
                                        cdata->res_name, ret);
                        continue;