linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Gregory Fong <gregory.0xf0@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-gpio@vger.kernel.org
Subject: [PATCH] gpio: brcmstb: Return proper error if bank width is invalid
Date: Sun, 10 Apr 2016 18:15:15 +0800	[thread overview]
Message-ID: <1460283315.10702.5.camel@ingics.com> (raw)

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(+)

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;
-- 
2.5.0


             reply	other threads:[~2016-04-10 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 10:15 Axel Lin [this message]
2016-04-12 22:59 ` [PATCH] gpio: brcmstb: Return proper error if bank width is invalid Gregory Fong
2016-04-15  8:10 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460283315.10702.5.camel@ingics.com \
    --to=axel.lin@ingics.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gnurou@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).