diff mbox series

crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe()

Message ID 20200403015710.2764-1-tangbin@cmss.chinamobile.com (mailing list archive)
State Superseded
Delegated to: Herbert Xu
Headers show
Series crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe() | expand

Commit Message

Tang Bin April 3, 2020, 1:57 a.m. UTC
In this place, when something goes wrong, platform_get_irq() will
print an error message, so in order to avoid the situation of repeat
output,we should remove dev_err here.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/crypto/amlogic/amlogic-gxl-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Neil Armstrong April 3, 2020, 7:44 a.m. UTC | #1
Subject should be: "[PATCH v3] crypto:amlogic: Delete duplicate dev_err in meson_crypto_probe()"

So for the next send, it will be "[PATCH v3] crypto: amlogic: ..."

On 03/04/2020 03:57, Tang Bin wrote:
> In this place, when something goes wrong, platform_get_irq() will
> print an error message, so in order to avoid the situation of repeat
> output,we should remove dev_err here.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  drivers/crypto/amlogic/amlogic-gxl-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
> index 9d4ead2f7..411857fad 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
> @@ -253,10 +253,8 @@ static int meson_crypto_probe(struct platform_device *pdev)
>  	mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
>  	for (i = 0; i < MAXFLOW; i++) {
>  		mc->irqs[i] = platform_get_irq(pdev, i);
> -		if (mc->irqs[i] < 0) {
> -			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
> +		if (mc->irqs[i] < 0)
>  			return mc->irqs[i];
> -		}
>  
>  		err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0,
>  				       "gxl-crypto", mc);
> 

This is better.

With the subject fixed, it will be ok.

Neil
diff mbox series

Patch

diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
index 9d4ead2f7..411857fad 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-core.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
@@ -253,10 +253,8 @@  static int meson_crypto_probe(struct platform_device *pdev)
 	mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
 	for (i = 0; i < MAXFLOW; i++) {
 		mc->irqs[i] = platform_get_irq(pdev, i);
-		if (mc->irqs[i] < 0) {
-			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
+		if (mc->irqs[i] < 0)
 			return mc->irqs[i];
-		}
 
 		err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0,
 				       "gxl-crypto", mc);