Revert "halapi: Fix mismatch by closing backend" 08/293508/1 accepted/tizen/unified/20230607.160240
authorChanwoo Choi <cw00.choi@samsung.com>
Wed, 31 May 2023 05:19:49 +0000 (14:19 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 31 May 2023 05:19:55 +0000 (14:19 +0900)
This reverts commit 82c338c4db17f1517e3efec3e4c482034f4b6b0d
because it causes the system halt.

Change-Id: I67a0ea9f324dfa46e894a3b49050eba972821cf3
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/hal-api-common.c

index 02a1ad8..3520a58 100644 (file)
@@ -455,7 +455,7 @@ static int __get_backend_data(enum hal_module module, unsigned int *abi_version,
                if (!info->backend->name || (len + 1 > name_size)) {
                        _E("%s: Invalid size of name[] array\n", info->module_name);
                        ret = -EINVAL;
-                       goto err_close_backend;
+                       goto err_conf_exit;
                }
 
                strncpy(name, info->backend->name, len);
@@ -468,7 +468,7 @@ static int __get_backend_data(enum hal_module module, unsigned int *abi_version,
                if (!info->backend->vendor || (len + 1 > vendor_size)) {
                        _E("%s: Invalid size of vendor[] array\n", info->module_name);
                        ret = -EINVAL;
-                       goto err_close_backend;
+                       goto err_conf_exit;
                }
 
                strncpy(vendor, info->backend->vendor, len);
@@ -476,12 +476,10 @@ static int __get_backend_data(enum hal_module module, unsigned int *abi_version,
        } else {
                _E("%s: Failed to get backend data\n", info->module_name);
                ret = -EINVAL;
-               goto err_close_backend;
+               goto err_conf_exit;
        }
        ret = 0;
 
-err_close_backend:
-       __close_backend(info);
 err_conf_exit:
        _hal_api_conf_exit();
 err_unlock: