From: Stefano Stabellini Subject: [PATCH] qemu-xen: read default pci passthrough values Date: Wed, 2 Feb 2011 16:54:18 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org If there are no devices assigned to the domain at boot, we don't read the default pci passthrough parameters. This patch fixes it. Signed-off-by: Stefano Stabellini diff --git a/xenstore.c b/xenstore.c index d364a5e..3fd69aa 100644 --- a/xenstore.c +++ b/xenstore.c @@ -738,9 +738,8 @@ void xenstore_parse_domain_config(int hvm_domid) free(params); params = xs_read(xsh, XBT_NULL, buf, &len); - if (params == NULL) - goto out; - num = atoi(params); + if (params != NULL) + num = atoi(params); /* get the pci pass-through parameter */ if (pasprintf(&buf, "/local/domain/0/backend/pci/%u/%u/msitranslate",