[cocci] [PATCH 22/36] iommu/s390: remove conditional return with no effect
Sang-Heon Jeon <[email protected]> Fri, 24 Jul 2026 03:45:24 +0900
| Newsgroups | fr.inria.cocci,dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <[email protected]> --- drivers/iommu/s390-iommu.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c index f148f559ac56..d008b1d14a9e 100644 --- a/drivers/iommu/s390-iommu.c +++ b/drivers/iommu/s390-iommu.c @@ -1115,8 +1115,6 @@ __setup("s390_iommu_aperture=", s390_iommu_aperture_setup); static int __init s390_iommu_init(void) { - int rc; - iommu_dma_forcedac = true; s390_iommu_aperture = (u64)virt_to_phys(high_memory); if (!s390_iommu_aperture_factor) @@ -1124,11 +1122,7 @@ static int __init s390_iommu_init(void) else s390_iommu_aperture *= s390_iommu_aperture_factor; - rc = dma_alloc_cpu_table_caches(); - if (rc) - return rc; - - return rc; + return dma_alloc_cpu_table_caches(); } subsys_initcall(s390_iommu_init); -- 2.43.0