[PATCH] irqchip/irq-bcm7038-l1: Remove unreachable code
Deepak R Varma
drv at mailo.com
Sat Feb 4 06:28:58 PST 2023
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 at mailo.com>
---
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
More information about the linux-arm-kernel
mailing list