linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwrng: xgene - Delete an error message in xgene_rng_probe()
@ 2020-04-04 15:17 Markus Elfring
  2020-04-16  6:51 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-04-04 15:17 UTC (permalink / raw)
  To: linux-crypto, Arnd Bergmann, Chuhong Yuan, Greg Kroah-Hartman,
	Herbert Xu, Ludovic Desroches, Łukasz Stelmach,
	Matt Mackall, Thomas Gleixner, YueHaibing
  Cc: LKML, kernel-janitors, Tang Bin

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 4 Apr 2020 17:07:34 +0200

The function “platform_get_irq” can log an error already.
Thus omit a redundant message for the exception handling in the
calling function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/char/hw_random/xgene-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/xgene-rng.c b/drivers/char/hw_random/xgene-rng.c
index d7516a446987..008e6db9ce01 100644
--- a/drivers/char/hw_random/xgene-rng.c
+++ b/drivers/char/hw_random/xgene-rng.c
@@ -328,10 +328,8 @@ static int xgene_rng_probe(struct platform_device *pdev)
 		return PTR_ERR(ctx->csr_base);

 	rc = platform_get_irq(pdev, 0);
-	if (rc < 0) {
-		dev_err(&pdev->dev, "No IRQ resource\n");
+	if (rc < 0)
 		return rc;
-	}
 	ctx->irq = rc;

 	dev_dbg(&pdev->dev, "APM X-Gene RNG BASE %p ALARM IRQ %d",
--
2.26.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwrng: xgene - Delete an error message in xgene_rng_probe()
  2020-04-04 15:17 [PATCH] hwrng: xgene - Delete an error message in xgene_rng_probe() Markus Elfring
@ 2020-04-16  6:51 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-04-16  6:51 UTC (permalink / raw)
  To: Markus Elfring
  Cc: linux-crypto, Arnd Bergmann, Chuhong Yuan, Greg Kroah-Hartman,
	Ludovic Desroches, Łukasz Stelmach, Matt Mackall,
	Thomas Gleixner, YueHaibing, LKML, kernel-janitors, Tang Bin

On Sat, Apr 04, 2020 at 05:17:19PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 4 Apr 2020 17:07:34 +0200
> 
> The function “platform_get_irq” can log an error already.
> Thus omit a redundant message for the exception handling in the
> calling function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/char/hw_random/xgene-rng.c | 4 +---
>  1 file changed, 1 insertion(+), 3 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:[~2020-04-16  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 15:17 [PATCH] hwrng: xgene - Delete an error message in xgene_rng_probe() Markus Elfring
2020-04-16  6:51 ` Herbert Xu

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).