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: <20181217080040.6790-1-peng.fan@nxp.com>
Date:   Mon, 17 Dec 2018 07:51:41 +0000
From:   Peng Fan <peng.fan@....com>
To:     "marc.zyngier@....com" <marc.zyngier@....com>,
        "jason@...edaemon.net" <jason@...edaemon.net>,
        "tglx@...utronix.de" <tglx@...utronix.de>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>, Peng Fan <peng.fan@....com>
Subject: [PATCH] irqchip: gic-v3: remove dead code in gic_iterate_rdists

In gic_iterate_rdists, ret will never be 0 when `ret ? -ENODEV : 0` at
the end of function, so let's directly return -ENODEV.

Signed-off-by: Peng Fan <peng.fan@....com>
---
 drivers/irqchip/irq-gic-v3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 8f87f40c9460..9d6e802e29ce 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -425,7 +425,7 @@ static void __init gic_dist_init(void)
 
 static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 {
-	int ret = -ENODEV;
+	int ret;
 	int i;
 
 	for (i = 0; i < gic_data.nr_redist_regions; i++) {
@@ -459,7 +459,7 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 		} while (!(typer & GICR_TYPER_LAST));
 	}
 
-	return ret ? -ENODEV : 0;
+	return -ENODEV;
 }
 
 static int __gic_populate_rdist(struct redist_region *region, void __iomem *ptr)
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ