[PATCH] irqchip/irq-bcm7038-l1: Remove unreachable code

From: Deepak R Varma
Date: Sat Feb 04 2023 - 09:29:34 EST


The macro for_each_possible_cpu() is designed to execute only once,
when the index is zero. Hence the test condition for index value
other than zero will never be reached. Remove this unreachable code.
Issue identified using itnull.cocci semantic patch script.

Signed-off-by: Deepak R Varma <drv@xxxxxxxxx>
---
drivers/irqchip/irq-bcm7038-l1.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index a62b96237b82..1b3ec4001356 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -410,8 +410,6 @@ static int __init bcm7038_l1_of_init(struct device_node *dn,
for_each_possible_cpu(idx) {
ret = bcm7038_l1_init_one(dn, idx, intc);
if (ret < 0) {
- if (idx)
- break;
pr_err("failed to remap intc L1 registers\n");
goto out_free;
}
--
2.34.1