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>
This commit is contained in:
parent
c31a571d43
commit
35b3fc8876
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue