return UAM_ERROR_INTERNAL;
}
- retv_if(FALSE == __add_plugin(handle, module), UAM_ERROR_INTERNAL);
+ if (FALSE == __add_plugin(handle, module)) {
+ UAM_ERR("Can't add plugin module");
+ dlclose(handle);
+ return UAM_ERROR_INTERNAL;
+ }
FUNC_EXIT;
return UAM_ERROR_NONE;
module = (uav_module_t *)dlsym(handle, symbol);
if (module == NULL) {
- UAM_ERR("Can't load power plugin module: %s", dlerror());
+ UAM_ERR("Can't load plugin module: %s", dlerror());
dlclose(handle);
return UAM_ERROR_INTERNAL;
}
return UAM_ERROR_INVALID_PARAMETER;
}
- retv_if(FALSE == __add_vendor_plugin(handle, module), UAM_ERROR_INTERNAL);
+ if (FALSE == __add_vendor_plugin(handle, module)) {
+ UAM_ERR("Can't add plugin module: %s", dlerror());
+ dlclose(handle);
+ return UAM_ERROR_INTERNAL;
+ }
FUNC_EXIT;
return UAM_ERROR_NONE;