|
@@ -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 *grer = (void __iomem *)(&lnw->reg_base->GRER[reg]);
|
|
|
void __iomem *gfer = (void __iomem *)(&lnw->reg_base->GFER[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;
|
|
return -EINVAL;
|
|
|
spin_lock_irqsave(&lnw->lock, flags);
|
|
spin_lock_irqsave(&lnw->lock, flags);
|
|
|
if (type & IRQ_TYPE_EDGE_RISING)
|
|
if (type & IRQ_TYPE_EDGE_RISING)
|