summaryrefslogtreecommitdiffstats
path: root/pcilib/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/pci.c')
-rw-r--r--pcilib/pci.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c
index ec40c95..c9cd1d2 100644
--- a/pcilib/pci.c
+++ b/pcilib/pci.c
@@ -147,9 +147,8 @@ pcilib_t *pcilib_open(const char *device, const char *model) {
err = pcilib_init_py(ctx);
if (err) {
- pcilib_error("Error (%i) initializing python subsystem", err);
- pcilib_close(ctx);
- return NULL;
+ pcilib_warning("Error (%i) initializing python subsystem", err);
+ pcilib_free_py(ctx);
}
ctx->alloc_reg = PCILIB_DEFAULT_REGISTER_SPACE;
@@ -191,22 +190,22 @@ pcilib_t *pcilib_open(const char *device, const char *model) {
if (!ctx->model)
ctx->model = strdup(model?model:"pci");
-
+
err = pcilib_py_add_script_dir(ctx, NULL);
if (err) {
- pcilib_error("Error (%i) add script path to python path", err);
- pcilib_close(ctx);
- return NULL;
+ pcilib_warning("Error (%i) add script path to python path", err);
+ pcilib_free_py(ctx);
+ err = 0;
}
-
-
+
+
xmlerr = pcilib_init_xml(ctx, ctx->model);
if ((xmlerr)&&(xmlerr != PCILIB_ERROR_NOTFOUND)) {
pcilib_error("Error (%i) initializing XML subsystem for model %s", xmlerr, ctx->model);
pcilib_close(ctx);
return NULL;
}
-
+
// We have found neither standard model nor XML
if ((err)&&(xmlerr)) {