]> xenbits.xensource.com Git - xen.git/commitdiff
AMD Vi: fix HPET ID check
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 13:23:35 +0000 (14:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 13:23:35 +0000 (14:23 +0100)
Cherry picked from commit 2ca9fbd739 ("AMD IOMMU: allocate IRTE entries
instead of using a static mapping") mainly to fix build with gcc 5.x.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/amd/iommu_intr.c

index 794304936b5f0fc29b5f1aeae41194075d4ec2da..789f564f61ace487feab5cf4b20ffc83b915b2ec 100644 (file)
@@ -449,8 +449,7 @@ void* __init amd_iommu_alloc_intremap_table(void)
 
 int __init amd_setup_hpet_msi(struct msi_desc *msi_desc)
 {
-    if ( (!msi_desc->hpet_id != hpet_sbdf.id) ||
-         (hpet_sbdf.iommu == NULL) )
+    if ( msi_desc->hpet_id != hpet_sbdf.id || !hpet_sbdf.iommu )
     {
         AMD_IOMMU_DEBUG("Fail to setup HPET MSI remapping\n");
         return 1;