From patchwork Wed Dec 16 16:10:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 68599 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI5k7Jn018521 for ; Fri, 18 Dec 2009 05:46:08 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKwVm-0004k8-UQ; Wed, 16 Dec 2009 16:14:02 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKwVl-0004k0-LZ for spi-devel-general@lists.sourceforge.net; Wed, 16 Dec 2009 16:14:01 +0000 X-ACL-Warn: Received: from metis.ext.pengutronix.de ([92.198.50.35]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NKwVf-0003Wt-4v for spi-devel-general@lists.sourceforge.net; Wed, 16 Dec 2009 16:14:01 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.69) (envelope-from ) id 1NKwSC-0002Jm-0O; Wed, 16 Dec 2009 17:10:20 +0100 Received: from ukl by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1NKwS5-0006T3-O2; Wed, 16 Dec 2009 17:10:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-kernel@vger.kernel.org Date: Wed, 16 Dec 2009 17:10:08 +0100 Message-Id: <1260979809-24811-6-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1260979809-24811-5-git-send-email-u.kleine-koenig@pengutronix.de> References: <1260979809-24811-1-git-send-email-u.kleine-koenig@pengutronix.de> <1260979809-24811-2-git-send-email-u.kleine-koenig@pengutronix.de> <1260979809-24811-3-git-send-email-u.kleine-koenig@pengutronix.de> <1260979809-24811-4-git-send-email-u.kleine-koenig@pengutronix.de> <1260979809-24811-5-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: spi-devel-general@lists.sourceforge.net X-Spam-Score: -1.2 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.2 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NKwVf-0003Wt-4v Cc: David Brownell , Greg Kroah-Hartman , spi-devel-general@lists.sourceforge.net, David Vrabel , Andrew Morton Subject: [spi-devel-general] [PATCH 6/7] spi/mpc8xxx: don't check platform_get_irq's return value against zero X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index e9390d7..b13501a 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -1339,7 +1339,7 @@ static int __devinit plat_mpc8xxx_spi_probe(struct platform_device *pdev) return -EINVAL; irq = platform_get_irq(pdev, 0); - if (!irq) + if ((int)irq <= 0) return -EINVAL; master = mpc8xxx_spi_probe(&pdev->dev, mem, irq);