All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Linus Walleij <linusw@kernel.org>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>,
	robh@kernel.org, linux-gpio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/5] pinctrl: keembay: Propagate errors from optional IRQ lookup
Date: Mon, 10 Aug 2026 12:31:39 +0700	[thread overview]
Message-ID: <20260810053142.27938-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260810053142.27938-1-phucduc.bui@gmail.com>

From: bui duc phuc <phucduc.bui@gmail.com>

platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no optional IRQ is available, while other errors should be propagated.

Propagate all error codes returned by platform_get_irq_optional() other
than -ENXIO.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/pinctrl/pinctrl-keembay.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-keembay.c b/drivers/pinctrl/pinctrl-keembay.c
index 3241d3ae6219..0b65b186e3c1 100644
--- a/drivers/pinctrl/pinctrl-keembay.c
+++ b/drivers/pinctrl/pinctrl-keembay.c
@@ -1497,8 +1497,10 @@ static int keembay_gpiochip_probe(struct keembay_pinctrl *kpc,
 		int irq;
 
 		irq = platform_get_irq_optional(pdev, i);
-		if (irq <= 0)
+		if (irq == -ENXIO)
 			continue;
+		if (irq < 0)
+			return irq;
 
 		girq->parents[i]	= irq;
 		kmb_irq->line	= girq->parents[i];
-- 
2.43.0


  reply	other threads:[~2026-08-10  5:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  5:31 [PATCH 1/5] pinctrl: ocelot: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-10  5:31 ` phucduc.bui [this message]
2026-08-10  6:53   ` [PATCH 2/5] pinctrl: keembay: " Andy Shevchenko
2026-08-11  2:48     ` Bui Duc Phuc
2026-08-10  5:31 ` [PATCH 3/5] pinctrl: lynxpoint: " phucduc.bui
2026-08-10  6:56   ` Andy Shevchenko
2026-08-10  5:31 ` [PATCH 4/5] pinctrl: baytrail: " phucduc.bui
2026-08-10  6:56   ` Andy Shevchenko
2026-08-10  5:31 ` [PATCH 5/5] pinctrl: bcm: iproc-gpio: " phucduc.bui
2026-08-10  6:48   ` Andy Shevchenko
2026-08-10  7:06 ` [PATCH 1/5] pinctrl: ocelot: " Andy Shevchenko

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=20260810053142.27938-2-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=andy@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjui@broadcom.com \
    --cc=robh@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.