Commit 35b3fc88 authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij

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: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c31a571d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment