iommu/amd: Remove redundant check
authorVasant Hegde via iommu <iommu@lists.linux-foundation.org>
Mon, 14 Mar 2022 07:02:26 +0000 (12:32 +0530)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 May 2022 08:32:32 +0000 (10:32 +0200)
smatch static checker warning:
  drivers/iommu/amd/init.c:1989 amd_iommu_init_pci()
  warn: duplicate check 'ret' (previous on line 1978)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 06687a03805e ("iommu/amd: Improve error handling for amd_iommu_init_pci")
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20220314070226.40641-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/init.c

index b4a798c7b347fe2d4651d5f2c1a45d2a8093ea5f..648d6b94ba8cca3051886840a8cd006fd095c876 100644 (file)
@@ -1986,8 +1986,7 @@ static int __init amd_iommu_init_pci(void)
        for_each_iommu(iommu)
                iommu_flush_all_caches(iommu);
 
-       if (!ret)
-               print_iommu_info();
+       print_iommu_info();
 
 out:
        return ret;