linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: linus.walleij@linaro.org, rjui@broadcom.com,
	sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
	rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com
Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: [PATCH v2 1/2] pinctrl: iproc: allow for error from platform_get_irq()
Date: Thu,  3 Oct 2019 13:03:09 +1300	[thread overview]
Message-ID: <20191003000310.17099-2-chris.packham@alliedtelesis.co.nz> (raw)
In-Reply-To: <20191003000310.17099-1-chris.packham@alliedtelesis.co.nz>

platform_get_irq() can return an error code. Allow for this when getting
the irq.

Fixes: 6f265e5d4da7 ("pinctrl: bcm-iproc: Pass irqchip when adding gpiochip")
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index 6f7d3a2f2e97..8971fc54e974 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -853,7 +853,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
 
 	/* optional GPIO interrupt support */
 	irq = platform_get_irq(pdev, 0);
-	if (irq) {
+	if (irq > 0) {
 		struct irq_chip *irqc;
 		struct gpio_irq_chip *girq;
 
-- 
2.23.0


  reply	other threads:[~2019-10-03  0:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  0:03 [PATCH v2 0/2] pinctrl: iproc: improve error handling Chris Packham
2019-10-03  0:03 ` Chris Packham [this message]
2019-10-03 18:36   ` [PATCH v2 1/2] pinctrl: iproc: allow for error from platform_get_irq() Scott Branden
2019-10-05 16:35   ` Linus Walleij
2019-10-03  0:03 ` [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip Chris Packham
2019-10-03 18:36   ` Scott Branden
2019-10-05 16:37   ` Linus Walleij
2019-10-07  7:30   ` Geert Uytterhoeven
2019-10-07  8:14     ` Marc Zyngier
2019-10-07 17:10       ` Scott Branden
2019-10-13 21:02         ` Chris Packham
2019-10-11  7:26       ` 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=20191003000310.17099-2-chris.packham@alliedtelesis.co.nz \
    --to=chris.packham@alliedtelesis.co.nz \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=li.jin@broadcom.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /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).