]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/vfio/vfio_iommu_type1.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / drivers / vfio / vfio_iommu_type1.c
index 0f353f5195747e7a3589666fb81d469664773a19..bd6f293c4ebd59b5f283ebc1193767c982e1f1ef 100644 (file)
@@ -1332,8 +1332,11 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
        if (ret)
                goto out_detach;
 
-       if (resv_msi && iommu_get_msi_cookie(domain->domain, resv_msi_base))
-               goto out_detach;
+       if (resv_msi) {
+               ret = iommu_get_msi_cookie(domain->domain, resv_msi_base);
+               if (ret)
+                       goto out_detach;
+       }
 
        list_add(&domain->next, &iommu->domain_list);