提交 35b3fc88 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@ingics.com>
Acked-by: NGregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 c31a571d
...@@ -461,6 +461,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) ...@@ -461,6 +461,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)
bank->id = num_banks; bank->id = num_banks;
if (bank_width <= 0 || bank_width > MAX_GPIO_PER_BANK) { if (bank_width <= 0 || bank_width > MAX_GPIO_PER_BANK) {
dev_err(dev, "Invalid bank width %d\n", bank_width); dev_err(dev, "Invalid bank width %d\n", bank_width);
err = -EINVAL;
goto fail; goto fail;
} else { } else {
bank->width = bank_width; bank->width = bank_width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册