Skip to contentSkip to conversation

hwrng: imx-rngc - irq already prints an error

PATCH RESEND In review Nigel Christian 2 participants 2 messages Oct 29, 2020 – Nov 6, 2020

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

PATCH RESEND 1/1 hwrng: imx-rngc - irq already prints an error

Clean up the check for irq. dev_err() is superfluous as platform_get_irq() already prints an error. Check for zero would indicate a bug. Remove curly braces to conform to styling requirements.

---
 drivers/char/hw_random/imx-rngc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/hw_random/imx-rngc.c +1 -3
index 61c844baf26e..b05d676ca814 100644
@@ -252,10 +252,8 @@ static int imx_rngc_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		dev_err(&pdev->dev, "Couldn't get irq %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = clk_prepare_enable(rngc->clk);
 	if (ret)
Signature · 1 line
2.28.0
maintainer
#1 lore raw
Quoted 8 lines · Nigel Christian

Clean up the check for irq. dev_err() is superfluous as platform_get_irq() already prints an error. Check for zero would indicate a bug. Remove curly braces to conform to styling requirements.

---
 drivers/char/hw_random/imx-rngc.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