From: Patrick Bridges Date: Wed, 20 May 2009 21:00:03 +0000 (-0600) Subject: Fixed v3_create_ide when NULL southbridge passed in (i.e. when .config_pci = 0) X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=2b7fcfd555d1c06c4e20280b556a5ed9f84979e8 Fixed v3_create_ide when NULL southbridge passed in (i.e. when .config_pci = 0) --- diff --git a/palacios/src/devices/ide.c b/palacios/src/devices/ide.c index 361bed0..2b04002 100644 --- a/palacios/src/devices/ide.c +++ b/palacios/src/devices/ide.c @@ -1526,7 +1526,10 @@ struct vm_device * v3_create_ide(struct vm_device * pci_bus, struct vm_device * struct vm_device * device = v3_create_device("IDE", &dev_ops, ide); ide->pci_bus = pci_bus; - ide->southbridge = (struct v3_southbridge *)(southbridge_dev->private_data); + if (ide->southbridge) + ide->southbridge = (struct v3_southbridge *)(southbridge_dev->private_data); + else + ide->southbridge = NULL; PrintDebug("IDE: Creating IDE bus x 2\n");