lkml.org 
[lkml]   [2023]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] irqchip/irq-bcm7038-l1: Remove unreachable code
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(-)

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


\
 
 \ /
  Last update: 2023-03-27 00:09    [W:1.044 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site