diff mbox series

[resend] hwrng: imx-rngc - irq already prints an error

Message ID 20201029005217.GA28008@fedora-project
State Accepted
Delegated to: Herbert Xu
Headers show
Series [resend] hwrng: imx-rngc - irq already prints an error | expand

Commit Message

Nigel Christian Oct. 29, 2020, 12:52 a.m. UTC
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.
Signed-off-by: Nigel Christian <nigel.l.christian@gmail.com>
---
 drivers/char/hw_random/imx-rngc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Herbert Xu Nov. 6, 2020, 7:02 a.m. UTC | #1
On Wed, Oct 28, 2020 at 08:52:17PM -0400, Nigel Christian wrote:
> 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.
> Signed-off-by: Nigel Christian <nigel.l.christian@gmail.com>
> ---
>  drivers/char/hw_random/imx-rngc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index 61c844baf26e..b05d676ca814 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -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)