diff mbox series

hwrng: xgene - Delete an error message in xgene_rng_probe()

Message ID 45447185-d64f-027c-7bca-c59ea21e6021@web.de (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series hwrng: xgene - Delete an error message in xgene_rng_probe() | expand

Commit Message

Markus Elfring April 4, 2020, 3:17 p.m. UTC
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(-)

--
2.26.0

Comments

Herbert Xu April 16, 2020, 6:51 a.m. UTC | #1
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.
diff mbox series

Patch

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",