* [PATCH] crypto: aspeed: Propagate platform_get_irq() errors
@ 2026-07-10 11:07 Narasimharao Vadlamudi
2026-07-17 8:17 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Narasimharao Vadlamudi @ 2026-07-10 11:07 UTC (permalink / raw)
To: Herbert Xu, David S . Miller
Cc: Neal Liu, Joel Stanley, Andrew Jeffery, YueHaibing, linux-aspeed,
linux-crypto, linux-arm-kernel, linux-kernel,
Narasimharao Vadlamudi
platform_get_irq() returns a positive IRQ number on success and a negative
error code on failure. aspeed_acry_probe() and aspeed_hace_probe()
already detect negative returns, but both convert every failure to -ENXIO.
Return the original error code so callers can handle errors such as
-EPROBE_DEFER correctly.
Fixes: 2f1cf4e50c95 ("crypto: aspeed - Add ACRY RSA driver")
Fixes: 70513e1d6559 ("crypto: aspeed - Fix check for platform_get_irq() errors")
Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
---
drivers/crypto/aspeed/aspeed-acry.c | 2 +-
drivers/crypto/aspeed/aspeed-hace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/aspeed/aspeed-acry.c b/drivers/crypto/aspeed/aspeed-acry.c
index 5993bcba9716..301612556a76 100644
--- a/drivers/crypto/aspeed/aspeed-acry.c
+++ b/drivers/crypto/aspeed/aspeed-acry.c
@@ -728,7 +728,7 @@ static int aspeed_acry_probe(struct platform_device *pdev)
/* Get irq number and register it */
acry_dev->irq = platform_get_irq(pdev, 0);
if (acry_dev->irq < 0)
- return -ENXIO;
+ return acry_dev->irq;
rc = devm_request_irq(dev, acry_dev->irq, aspeed_acry_irq, 0,
dev_name(dev), acry_dev);
diff --git a/drivers/crypto/aspeed/aspeed-hace.c b/drivers/crypto/aspeed/aspeed-hace.c
index 3fe644bfe037..1f9afa002ae8 100644
--- a/drivers/crypto/aspeed/aspeed-hace.c
+++ b/drivers/crypto/aspeed/aspeed-hace.c
@@ -127,7 +127,7 @@ static int aspeed_hace_probe(struct platform_device *pdev)
/* Get irq number and register it */
hace_dev->irq = platform_get_irq(pdev, 0);
if (hace_dev->irq < 0)
- return -ENXIO;
+ return hace_dev->irq;
rc = devm_request_irq(&pdev->dev, hace_dev->irq, aspeed_hace_irq, 0,
dev_name(&pdev->dev), hace_dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] crypto: aspeed: Propagate platform_get_irq() errors
2026-07-10 11:07 [PATCH] crypto: aspeed: Propagate platform_get_irq() errors Narasimharao Vadlamudi
@ 2026-07-17 8:17 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2026-07-17 8:17 UTC (permalink / raw)
To: Narasimharao Vadlamudi
Cc: David S . Miller, Neal Liu, Joel Stanley, Andrew Jeffery,
YueHaibing, linux-aspeed, linux-crypto, linux-arm-kernel,
linux-kernel
On Fri, Jul 10, 2026 at 04:37:29PM +0530, Narasimharao Vadlamudi wrote:
> platform_get_irq() returns a positive IRQ number on success and a negative
> error code on failure. aspeed_acry_probe() and aspeed_hace_probe()
> already detect negative returns, but both convert every failure to -ENXIO.
>
> Return the original error code so callers can handle errors such as
> -EPROBE_DEFER correctly.
>
> Fixes: 2f1cf4e50c95 ("crypto: aspeed - Add ACRY RSA driver")
> Fixes: 70513e1d6559 ("crypto: aspeed - Fix check for platform_get_irq() errors")
> Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
> ---
> drivers/crypto/aspeed/aspeed-acry.c | 2 +-
> drivers/crypto/aspeed/aspeed-hace.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-17 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 11:07 [PATCH] crypto: aspeed: Propagate platform_get_irq() errors Narasimharao Vadlamudi
2026-07-17 8:17 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox