hwrng: imx-rngc - irq already prints an error
authorNigel Christian <nigel.l.christian@gmail.com>
Thu, 29 Oct 2020 00:52:17 +0000 (20:52 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Nov 2020 03:31:15 +0000 (14:31 +1100)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/imx-rngc.c

index 61c844b..b05d676 100644 (file)
@@ -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)