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>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 Oct 2010 21:28:27 +0400
From:	Vasiliy Kulikov <segooon@...il.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Paul Mundt <lethal@...ux-sh.org>, linux-sh@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] sh: boards/mach-x3proto: gpio: fix error handling code

Checks for (irq < 0) and (ilsel < 0) didn't make sense since they were
unsigned.  Made them signed.

Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
 I cannot compile this driver, so it is not tested.

 arch/sh/boards/mach-x3proto/gpio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c
index 9fcd7ce..594adf7 100644
--- a/arch/sh/boards/mach-x3proto/gpio.c
+++ b/arch/sh/boards/mach-x3proto/gpio.c
@@ -79,7 +79,7 @@ struct gpio_chip x3proto_gpio_chip = {
 
 int __init x3proto_gpio_setup(void)
 {
-	unsigned int ilsel;
+	int ilsel;
 	int ret, i;
 
 	ilsel = ilsel_enable(ILSEL_KEY);
@@ -92,7 +92,7 @@ int __init x3proto_gpio_setup(void)
 
 	for (i = 0; i < NR_BASEBOARD_GPIOS; i++) {
 		unsigned long flags;
-		unsigned int irq = create_irq();
+		int irq = create_irq();
 
 		if (unlikely(irq < 0)) {
 			ret = -EINVAL;
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ