From patchwork Thu Jun 10 16:20:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 105415 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5AGKiEk025486 for ; Thu, 10 Jun 2010 16:20:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759482Ab0FJQUd (ORCPT ); Thu, 10 Jun 2010 12:20:33 -0400 Received: from qmta14.westchester.pa.mail.comcast.net ([76.96.59.212]:40633 "EHLO qmta14.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759313Ab0FJQUc (ORCPT ); Thu, 10 Jun 2010 12:20:32 -0400 Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19]) by qmta14.westchester.pa.mail.comcast.net with comcast id UFD61e0050QuhwU5EGLYST; Thu, 10 Jun 2010 16:20:32 +0000 Received: from localhost.localdomain ([75.71.122.219]) by omta02.westchester.pa.mail.comcast.net with comcast id UGLX1e00M4k7Kz73NGLXUs; Thu, 10 Jun 2010 16:20:32 +0000 From: Alex Williamson Subject: [PATCH] device-assignment: Don't deassign when the assignment fails To: kvm@vger.kernel.org Date: Thu, 10 Jun 2010 10:20:15 -0600 Message-ID: <20100610162015.13106.3162.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 10 Jun 2010 16:20:44 +0000 (UTC) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 2b963b5..7e53a95 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1407,12 +1407,12 @@ static int assigned_initfn(struct PCIDevice *pci_dev) if (pci_enable_capability_support(pci_dev, 0, NULL, assigned_device_pci_cap_write_config, assigned_device_pci_cap_init) < 0) - goto assigned_out; + goto out; /* assign device to guest */ r = assign_device(dev); if (r < 0) - goto assigned_out; + goto out; /* assign irq for the device */ r = assign_irq(dev);