浏览代码

gpio: mvebu: make mvchip->irqbase signed for error handling

There is a bug in mvebu_gpio_probe() where we do:

	mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1);
	if (mvchip->irqbase < 0) {

The problem is that mvchip->irqbase is unsigned so the error handling
doesn't work.  I have changed it to be a regular int.

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Dan Carpenter 11 年之前
父节点
当前提交
d535922691
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpio/gpio-mvebu.c

+ 1 - 1
drivers/gpio/gpio-mvebu.c

@@ -79,7 +79,7 @@ struct mvebu_gpio_chip {
 	spinlock_t	   lock;
 	spinlock_t	   lock;
 	void __iomem	  *membase;
 	void __iomem	  *membase;
 	void __iomem	  *percpu_membase;
 	void __iomem	  *percpu_membase;
-	unsigned int       irqbase;
+	int		   irqbase;
 	struct irq_domain *domain;
 	struct irq_domain *domain;
 	int                soc_variant;
 	int                soc_variant;
 };
 };