From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55082 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBuO6-0000SB-BQ for qemu-devel@nongnu.org; Tue, 11 May 2010 14:41:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBuO1-0001KK-JC for qemu-devel@nongnu.org; Tue, 11 May 2010 14:41:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60043) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBuO1-0001Ju-Aj for qemu-devel@nongnu.org; Tue, 11 May 2010 14:40:57 -0400 Subject: Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init() From: Alex Williamson In-Reply-To: References: <20100510150016.15398.36521.stgit@virtlab9.virt.bos.redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 11 May 2010 12:40:52 -0600 Message-ID: <1273603252.2682.50.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Tue, 2010-05-11 at 21:17 +0300, Blue Swirl wrote: > On 5/10/10, Alex Williamson wrote: > > > > hw/pci.c | 17 ++++++++++++----- > > 1 files changed, 12 insertions(+), 5 deletions(-) > > > > diff --git a/hw/pci.c b/hw/pci.c > > index f167436..3d3560e 100644 > > --- a/hw/pci.c > > +++ b/hw/pci.c > > @@ -625,6 +625,14 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, > > return pci_dev; > > } > > > > +static void do_pci_unregister_device(PCIDevice *pci_dev) > > +{ > > + qemu_free_irqs(pci_dev->irq); > > + pci_dev->bus->devices[pci_dev->devfn] = NULL; > > + pci_config_free(pci_dev); > > + return; > > Isn't this 'return' useless? Yeah, I'll remove it. Alex