Skip to contentSkip to conversation

gpio: brcmstb: Return proper error if bank width is invalid

PATCH In review Axel Lin 3 participants 3 messages Apr 10, 2016 – Apr 15, 2016

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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.

---
 drivers/gpio/gpio-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-brcmstb.c +1 -0
index 42d51c5..e648914 100644
@@ -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