kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend] hwrng: imx-rngc - irq already prints an error
@ 2020-10-29  0:52 Nigel Christian
  2020-11-06  7:02 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Nigel Christian @ 2020-10-29  0:52 UTC (permalink / raw)
  To: dan.carpenter, martin
  Cc: mpm, herbert, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-crypto, prasannatsmkumar, m.felsch, kernel-janitors

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(-)

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)
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH resend] hwrng: imx-rngc - irq already prints an error
  2020-10-29  0:52 [PATCH resend] hwrng: imx-rngc - irq already prints an error Nigel Christian
@ 2020-11-06  7:02 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-11-06  7:02 UTC (permalink / raw)
  To: Nigel Christian
  Cc: dan.carpenter, martin, mpm, shawnguo, s.hauer, kernel, festevam,
	linux-imx, linux-crypto, prasannatsmkumar, m.felsch,
	kernel-janitors

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.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-06  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-29  0:52 [PATCH resend] hwrng: imx-rngc - irq already prints an error Nigel Christian
2020-11-06  7:02 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).