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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260306850-14945-2-git-send-email-u.kleine-koenig@pengutronix.de>
Date:	Tue,  8 Dec 2009 22:14:07 +0100
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	spi-devel-general@...ts.sourceforge.net
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Daniel Mack <daniel@...aq.de>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH 2/5] spi-imx: correct check for platform_get_irq failing

platform_get_irq returns -ENXIO if there is no entry.  So don't check
return value being nonzero but greater or equal to zero.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Sascha Hauer <s.hauer@...gutronix.de>
---
 drivers/spi/spi_imx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index c83ca05..d8d9a35 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -554,7 +554,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
 	}
 
 	spi_imx->irq = platform_get_irq(pdev, 0);
-	if (!spi_imx->irq) {
+	if (spi_imx->irq < 0) {
 		ret = -EINVAL;
 		goto out_iounmap;
 	}
-- 
1.6.5.2

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