[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.1] AMD IOMMU: don't BUG() when we don't have to
commit 6743c50ca91da63de23ad52f037bf9eadacfb492 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Feb 22 13:58:20 2013 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Feb 22 13:58:20 2013 +0100 AMD IOMMU: don't BUG() when we don't have to find_iommu_for_device() can easily return NULL instead, as all of its callers are prepared for that. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> master changeset: f547d42ec0306cdceffb8f7603c7e6f8977cf398 master date: 2013-02-18 09:37:35 +0100 --- xen/drivers/passthrough/amd/pci_amd_iommu.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c index ccb39ea..21b7460 100644 --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c @@ -30,8 +30,7 @@ extern struct ivrs_mappings *ivrs_mappings; struct amd_iommu *find_iommu_for_device(int bdf) { - BUG_ON ( bdf >= ivrs_bdf_entries ); - return ivrs_mappings[bdf].iommu; + return bdf < ivrs_bdf_entries ? ivrs_mappings[bdf].iommu : NULL; } /* -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.1 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |