Skip to contentSkip to conversation

irqchip: gic-v3: remove dead code in gic_iterate_rdists

PATCH New Peng Fan 1 participant 1 message Dec 17, 2018

Subsystems (2)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 irqchip: gic-v3: remove dead code in gic_iterate_rdists

In gic_iterate_rdists, ret will never be 0 when ret ? -ENODEV : 0 at the end of function, so let's directly return -ENODEV.

---
 drivers/irqchip/irq-gic-v3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-gic-v3.c +2 -2
index 8f87f40c9460..9d6e802e29ce 100644
@@ -425,7 +425,7 @@ static void __init gic_dist_init(void)
 
 static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 {
-	int ret = -ENODEV;
+	int ret;
 	int i;
 
 	for (i = 0; i < gic_data.nr_redist_regions; i++) {
@@ -459,7 +459,7 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 		} while (!(typer & GICR_TYPER_LAST));
 	}
 
-	return ret ? -ENODEV : 0;
+	return -ENODEV;
 }
 
 static int __gic_populate_rdist(struct redist_region *region, void __iomem *ptr)
Signature · 1 line
2.14.1