Skip to contentSkip to conversation

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

PATCH In review Markus Elfring 2 participants 2 messages Apr 4, 2020 – Apr 16, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: Markus Elfring <[email protected]>
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.

---
 drivers/char/hw_random/xgene-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/hw_random/xgene-rng.c +1 -3
index d7516a446987..008e6db9ce01 100644
@@ -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

maintainer
#1 lore raw
Quoted 7 lines · Markus Elfring

From: Markus Elfring <[email protected]>
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.

Quoted 6 lines

This issue was detected by using the Coccinelle software.

---
 drivers/char/hw_random/xgene-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt