// PIC is only usable in non-multicore environments
// just hardcode the core context
struct guest_info * core = &(vm->cores[0]);
+
+ state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal));
V3_ASSERT(state != NULL);
-
- state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal));
-
struct vm_device * dev = v3_add_device(vm, dev_id, &dev_ops, state);
&(vnetnic->net_ops), frontend_cfg, vnetnic) == -1) {
PrintError("Could not connect %s to frontend %s\n",
dev_id, v3_cfg_val(frontend_cfg, "tag"));
- v3_remove_device(vnetnic);
+ v3_remove_device(dev);
return -1;
}
if ((vnet_dev_id = register_to_vnet(vm, vnetnic, dev_id, vnetnic->mac)) == -1) {
PrintError("Vnet-nic device %s (mac: %s) fails to registered to VNET\n", dev_id, macstr);
- v3_remove_device(vnetnic);
+ v3_remove_device(dev);
return 0;
}