diff options
author | Axel Lin <axel.lin@ingics.com> | 2016-04-10 13:15:15 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-15 11:09:48 +0300 |
commit | 35b3fc8876ef927885f68e481efc049285d07e53 (patch) | |
tree | 678986c840ba2c20a142adc1ff83f7c012576c0f /drivers/gpio | |
parent | c31a571d4360a7765613615709627e83059ce946 (diff) | |
download | linux-35b3fc8876ef927885f68e481efc049285d07e53.tar.xz |
gpio: brcmstb: Return proper error if bank width is invalid
Return proper error in brcmstb_gpio_probe if bank width is invalid.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-brcmstb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 42d51c59ed50..e6489143721a 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -461,6 +461,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) bank->id = num_banks; if (bank_width <= 0 || bank_width > MAX_GPIO_PER_BANK) { dev_err(dev, "Invalid bank width %d\n", bank_width); + err = -EINVAL; goto fail; } else { bank->width = bank_width; |