char *error = dlerror();
if (error != NULL) {
- LOGE("Failed dlsym : %s\n", error);
+ LOGE("Failed dlsym : %s", error);
return VISION_SOURCE_ERROR_INTERNAL;
}
attach_backend(&(handle->funcs));
LOGD("ENTER");
LOGI("backend %s connected", backend_name);
handle->dl_handle = dlopen(backend_name, RTLD_LAZY);
- VISION_SOURCE_NULL_ARG_CHECK(handle->dl_handle);
+ if (!handle->dl_handle) {
+ LOGE("Failed dlopen : %s", dlerror());
+ return VISION_SOURCE_ERROR_INTERNAL;
+ }
int ret = _vision_source_dlsym(handle);
if (ret != VISION_SOURCE_ERROR_NONE) {