From patchwork Thu Dec 9 16:16:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 394882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB9GGR4r018866 for ; Thu, 9 Dec 2010 16:16:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891Ab0LIQQY (ORCPT ); Thu, 9 Dec 2010 11:16:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51292 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972Ab0LIQQX (ORCPT ); Thu, 9 Dec 2010 11:16:23 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB9GGNUC015761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Dec 2010 11:16:23 -0500 Received: from s20.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB9GGMaK009152; Thu, 9 Dec 2010 11:16:22 -0500 From: Alex Williamson Subject: [PATCH] pci: Fix PCI capabilities collision error value To: kvm@vger.kernel.org Cc: avi@redhat.com, alex.williamson@redhat.com Date: Thu, 09 Dec 2010 09:16:22 -0700 Message-ID: <20101209161622.10386.72203.stgit@s20.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Dec 2010 16:16:28 +0000 (UTC) diff --git a/hw/pci.c b/hw/pci.c index 288d6fd..0962416 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1856,7 +1856,7 @@ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id, pci_find_domain(pdev->bus), pci_bus_num(pdev->bus), PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), cap_id, offset, pdev->config_map[i], i); - return -EFAULT; + return -EINVAL; } } }