gpio: brcmstb: Return proper error if bank width is invalid
PATCH 1/1 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 <[email protected]>
--- drivers/gpio/gpio-brcmstb.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-brcmstb.c +1 -0
@@ -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;
Signature · 1 line
2.5.0
Quoted 1 line · Axel Lin
Return proper error in
brcmstb_gpio_probeif bank width is invalid.
Thanks for catching that.
Quoted 2 lines
Signed-off-by Axel Lin <[email protected]>
Acked-by Gregory Fong <[email protected]>
Quoted 3 lines · Axel Lin
Return proper error in
brcmstb_gpio_probeif bank width is invalid.Signed-off-by Axel Lin <[email protected]>
Patch applied with Gregory's ACK.
Yours,
Linus Walleij