lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Y95rqrQOVMRfxnn9@ubun2204.myguest.virtualbox.org>
Date:   Sat, 4 Feb 2023 19:58:58 +0530
From:   Deepak R Varma <drv@...lo.com>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc:     Saurabh Singh Sengar <ssengar@...rosoft.com>,
        Praveen Kumar <kumarpraveen@...ux.microsoft.com>,
        Deepak R Varma <drv@...lo.com>
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@...lo.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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ