From: Avi Weiss <thnkslprpt@gmail.com>
To: Conor Dooley <conor@kernel.org>, Jonathan Cameron <jic23@kernel.org>
Cc: Paul Walmsley <pjw@kernel.org>,
Samuel Holland <samuel.holland@sifive.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] cache: sifive_ccache: propagate IRQ count errors
Date: Tue, 13 Oct 2026 12:57:56 +0300 [thread overview]
Message-ID: <20261013095756.1084568-1-thnkslprpt@gmail.com> (raw)
platform_irq_count() returns -EPROBE_DEFER when the
interrupt provider is not ready, but
sifive_ccache_probe() only checks for a zero count.
-EPROBE_DEFER seems to be the only negative return
code possible here (currently).
A negative count skips the IRQ registration loop and
allows the probe to return success without requesting
a deferred retry.
Return negative IRQ counts so the driver is reprobed
when the interrupt provider becomes available.
Fixes: c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a platform driver")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/cache/sifive_ccache.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cache/sifive_ccache.c b/drivers/cache/sifive_ccache.c
index 2acb8bdf06d52..b4033110f34e5 100644
--- a/drivers/cache/sifive_ccache.c
+++ b/drivers/cache/sifive_ccache.c
@@ -262,6 +262,9 @@ static int sifive_ccache_probe(struct platform_device *pdev)
quirks = (unsigned long)device_get_match_data(dev);
intr_num = platform_irq_count(pdev);
+ if (intr_num < 0)
+ return dev_err_probe(dev, intr_num,
+ "Failed to count interrupts\n");
if (!intr_num)
return dev_err_probe(dev, -ENODEV, "No interrupts property\n");
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.43.0
reply other threads:[~2026-10-13 9:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261013095756.1084568-1-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=conor@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=pjw@kernel.org \
--cc=samuel.holland@sifive.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
all inboxes | Powered by JetHome®