]> Pileus Git - ~andy/linux/blobdiff - drivers/gpio/langwell_gpio.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[~andy/linux] / drivers / gpio / langwell_gpio.c
index 4baf3d7d0f8e6e4f1f7887625b7f73a62dba1a83..6c0ebbdc659ee3bdba7fa17256b74462c4858ff2 100644 (file)
@@ -123,7 +123,7 @@ static int lnw_irq_type(unsigned irq, unsigned type)
        void __iomem *grer = (void __iomem *)(&lnw->reg_base->GRER[reg]);
        void __iomem *gfer = (void __iomem *)(&lnw->reg_base->GFER[reg]);
 
-       if (gpio < 0 || gpio > lnw->chip.ngpio)
+       if (gpio >= lnw->chip.ngpio)
                return -EINVAL;
        spin_lock_irqsave(&lnw->lock, flags);
        if (type & IRQ_TYPE_EDGE_RISING)