From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Daniel Mack <daniel-rDUAYElUppE@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 2/5] spi-imx: correct check for platform_get_irq failing
Date: Tue, 8 Dec 2009 22:14:07 +0100 [thread overview]
Message-ID: <1260306850-14945-2-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1260306850-14945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
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@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sascha Hauer <s.hauer@pengutronix.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
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
next prev parent reply other threads:[~2009-12-08 21:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 21:12 [PATCH 0/5] spi-imx: some updates Uwe Kleine-König
[not found] ` <20091208211258.GA13706-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14 ` [PATCH 1/5] spi-imx: use platform_driver_probe as probe lives in .init.text Uwe Kleine-König
[not found] ` <1260306850-14945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14 ` Uwe Kleine-König [this message]
[not found] ` <1260306850-14945-2-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14 ` [PATCH 3/5] spi-imx: use positive logic to distinguish cpu variants Uwe Kleine-König
[not found] ` <1260306850-14945-3-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14 ` [PATCH 4/5] spi-imx: Add mx25 support Uwe Kleine-König
[not found] ` <1260306850-14945-4-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14 ` [PATCH 5/5] spi-imx: don't access struct device directly but use dev_get_platdata Uwe Kleine-König
2009-12-08 23:32 ` [PATCH 0/5] spi-imx: some updates Andrew Morton
2009-12-09 0:25 ` Grant Likely
[not found] ` <fa686aa40912081625y3750a7fegbac38926182e38c6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-09 0:35 ` Andrew Morton
2009-12-09 6:15 ` Grant Likely
2009-12-09 0:47 ` [spi-devel-general] " jassi brar
2009-12-09 1:50 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260306850-14945-2-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=daniel-rDUAYElUppE@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).