halapi: Ignore already fully put hal backend 60/252560/2 accepted/tizen/unified/20210201.055404 submit/tizen/20210129.082040
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Jan 2021 07:52:35 +0000 (16:52 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Jan 2021 08:00:11 +0000 (08:00 +0000)
In hal_common_put_backend(), requested module backend can be
already put fully. For the case, ignore the hal backend.

Change-Id: I7eef57fa12273760d28b22738ee878ac423da651
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/hal-api-common.c

index b07765d..c4e2372 100644 (file)
@@ -163,7 +163,12 @@ int hal_common_put_backend(enum hal_module module, void *data)
        backend = hal_module_info[module].library_backend;
        handle = hal_module_info[module].library_handle;
 
-       if (backend && backend->exit) {
+       if (!backend) {
+               _I("Already fully put for HAL module (%d)\n", module);
+               return TIZEN_ERROR_NONE;
+       }
+
+       if (backend->exit) {
                ret = backend->exit(data);
                if (ret < 0) {
                        _E("Failed to exit backend: name(%s)/vendor(%s)\n",