irqchip/irq-bcm7038-l1: Remove unreachable code

Message ID Y95rqrQOVMRfxnn9@ubun2204.myguest.virtualbox.org
State New
Headers
Series irqchip/irq-bcm7038-l1: Remove unreachable code |

Commit Message

Deepak R Varma Feb. 4, 2023, 2:28 p.m. UTC
  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@mailo.com>
---
 drivers/irqchip/irq-bcm7038-l1.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

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;
 		}