Browse Source

gpio: mvebu: Do not hard code error code

Return the appropriate error code instead of hardcoding it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Sachin Kamat 11 years ago
parent
commit
3509c6fa05
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpio/gpio-mvebu.c

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

@@ -676,7 +676,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1);
 	mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1);
 	if (mvchip->irqbase < 0) {
 	if (mvchip->irqbase < 0) {
 		dev_err(&pdev->dev, "no irqs\n");
 		dev_err(&pdev->dev, "no irqs\n");
-		return -ENOMEM;
+		return mvchip->irqbase;
 	}
 	}
 
 
 	gc = irq_alloc_generic_chip("mvebu_gpio_irq", 2, mvchip->irqbase,
 	gc = irq_alloc_generic_chip("mvebu_gpio_irq", 2, mvchip->irqbase,