0 is a valid interrupt number. Absence of an interrupt is usually
indicated with -1. at86rf230_probe assumes that an unspecified
interrupt would be indicated with zero and it therefore refuses
to accept interrupt 0. This patch corrects the check.

Signed-off-by: Werner Almesberger <wer...@almesberger.net>

---
 drivers/ieee802154/at86rf230.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ieee802154/at86rf230.c b/drivers/ieee802154/at86rf230.c
index 556ebc4..f8b15e9 100644
--- a/drivers/ieee802154/at86rf230.c
+++ b/drivers/ieee802154/at86rf230.c
@@ -647,7 +647,7 @@ static int __devinit at86rf230_probe(struct spi_device *spi)
        const char *chip;
        int supported = 0;
 
-       if (!spi->irq) {
+       if (spi->irq < 0) {
                dev_err(&spi->dev, "no IRQ specified\n");
                return -EINVAL;
        }
-- 
1.7.0.4


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to