Message ID | 1460283315.10702.5.camel@ingics.com |
---|---|
State | New |
Headers | show |
On Sun, Apr 10, 2016 at 3:15 AM, Axel Lin <axel.lin@ingics.com> wrote: > Return proper error in brcmstb_gpio_probe if bank width is invalid. Thanks for catching that. > > Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Gregory Fong <gregory.0xf0@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Apr 10, 2016 at 12:15 PM, Axel Lin <axel.lin@ingics.com> wrote: > Return proper error in brcmstb_gpio_probe if bank width is invalid. > > Signed-off-by: Axel Lin <axel.lin@ingics.com> Patch applied with Gregory's ACK. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 42d51c5..e648914 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -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;
Return proper error in brcmstb_gpio_probe if bank width is invalid. Signed-off-by: Axel Lin <axel.lin@ingics.com> --- drivers/gpio/gpio-brcmstb.c | 1 + 1 file changed, 1 insertion(+)