IB/usnic: clean up some error handling code
[deliverable/linux.git] / drivers / infiniband / hw / usnic / usnic_uiom.c
index 417de1f329606e990fbcfa03580e3c3edcb51993..cb2337f0532b5dcbe0d328eb74a196d976b7b6dc 100644 (file)
@@ -472,11 +472,10 @@ struct usnic_uiom_pd *usnic_uiom_alloc_pd(void)
                return ERR_PTR(-ENOMEM);
 
        pd->domain = domain = iommu_domain_alloc(&pci_bus_type);
-       if (IS_ERR_OR_NULL(domain)) {
-               usnic_err("Failed to allocate IOMMU domain with err %ld\n",
-                               PTR_ERR(pd->domain));
+       if (!domain) {
+               usnic_err("Failed to allocate IOMMU domain");
                kfree(pd);
-               return ERR_PTR(domain ? PTR_ERR(domain) : -ENOMEM);
+               return ERR_PTR(-ENOMEM);
        }
 
        iommu_set_fault_handler(pd->domain, usnic_uiom_dma_fault, NULL);
This page took 0.024539 seconds and 5 git commands to generate.