/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pci.c

  • Committer: zilio nicolas
  • Date: 2015-09-07 08:35:48 UTC
  • mto: This revision was merged to the branch mainline in revision 303.
  • Revision ID: nicolas.zilio@kit.edu-20150907083548-wcckckjtm0l84hsw
further modifications

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
        if (!ctx->model)
173
173
            ctx->model = strdup(model?model:"pci");
174
174
        
175
 
        pcilib_init_xml(ctx, ctx->model);
 
175
        err = pcilib_init_xml(ctx, ctx->model);
 
176
        if (err) {
 
177
            pcilib_error("Error (%i) initializing xml part\n", err);
 
178
            pcilib_close(ctx);
 
179
            return NULL;
 
180
        }
176
181
        
177
182
        ctx->model_info.registers = ctx->registers;
178
183
        ctx->model_info.banks = ctx->banks;
357
362
        }
358
363
 
359
364
        pcilib_free_register_banks(ctx);
 
365
 
 
366
        if(ctx->xml_ctx)
 
367
          pcilib_free_xml(ctx);
360
368
        
361
369
        if (ctx->register_ctx)
362
370
            free(ctx->register_ctx);