#include <stdio.h>
#include <stdint.h>
+#include <unistd.h>
#include <stdbool.h>
#include <dlfcn.h>
#include <dirent.h>
info->module_name);
ret = -EINVAL;
goto err;
+ } else if (access(backend_library_name, F_OK) == -1) {
+ _I("%s: There is no backend library\n",
+ info->module_name);
+ ret = -ENOENT;
+ goto err;
}
if (!info->symbol_name) {
}
ret = __open_backend(info);
- if (ret < 0) {
- _E("%s: Failed to get the backend library by dlopen\n",
- info->module_name);
- ret = -EINVAL;
+ if (ret < 0)
goto err;
- }
ret = __init_backend(info, data, NULL);
if (ret < 0) {
}
ret = __open_backend(info);
- if (ret < 0) {
- _E("%s: Failed to get the backend library by dlopen\n",
- info->module_name);
- ret = -EINVAL;
+ if (ret < 0)
goto err_conf_exit;
- }
/* Return abi_verion of hal_backend structure */
if (!name_size && !vendor_size) {