Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sachin Kamat and committed by
Linus Walleij
3509c6fa 5ea80e49

+1 -1
+1 -1
drivers/gpio/gpio-mvebu.c
··· 676 676 mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1); 677 677 if (mvchip->irqbase < 0) { 678 678 dev_err(&pdev->dev, "no irqs\n"); 679 - return -ENOMEM; 679 + return mvchip->irqbase; 680 680 } 681 681 682 682 gc = irq_alloc_generic_chip("mvebu_gpio_irq", 2, mvchip->irqbase,