diff mbox series

crypto: atmel-sha: remove unneeded break

Message ID 20201019193653.13757-1-trix@redhat.com
State Accepted
Commit 77fdd94f091f88b045e4f45ea94cac463cbd3221
Headers show
Series crypto: atmel-sha: remove unneeded break | expand

Commit Message

Tom Rix Oct. 19, 2020, 7:36 p.m. UTC
From: Tom Rix <trix@redhat.com>

A break is not needed if it is preceded by a return

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/crypto/atmel-sha.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Alexandre Belloni Oct. 26, 2020, 8:43 p.m. UTC | #1
On 19/10/2020 12:36:53-0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>

> 

> A break is not needed if it is preceded by a return

> 

> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>


> ---

>  drivers/crypto/atmel-sha.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c

> index 75ccf41a7cb9..0eb6f54e3b66 100644

> --- a/drivers/crypto/atmel-sha.c

> +++ b/drivers/crypto/atmel-sha.c

> @@ -459,7 +459,6 @@ static int atmel_sha_init(struct ahash_request *req)

>  		break;

>  	default:

>  		return -EINVAL;

> -		break;

>  	}

>  

>  	ctx->bufcnt = 0;

> -- 

> 2.18.1

> 


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Herbert Xu Nov. 6, 2020, 6:59 a.m. UTC | #2
On Mon, Oct 19, 2020 at 12:36:53PM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>

> 

> A break is not needed if it is preceded by a return

> 

> Signed-off-by: Tom Rix <trix@redhat.com>

> ---

>  drivers/crypto/atmel-sha.c | 1 -

>  1 file changed, 1 deletion(-)


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
diff mbox series

Patch

diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index 75ccf41a7cb9..0eb6f54e3b66 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -459,7 +459,6 @@  static int atmel_sha_init(struct ahash_request *req)
 		break;
 	default:
 		return -EINVAL;
-		break;
 	}
 
 	ctx->bufcnt = 0;