diff mbox

crypto: n2 - Remove return statement from void function

Message ID 20160318133848.GA25643@amitoj-Inspiron-3542 (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Amitoj Kaur Chawla March 18, 2016, 1:38 p.m. UTC
Return statement at the end of a void function is useless.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
identifier f;
expression e;
@@
void f(...) {
<...
- return
  e;
...>
}
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/crypto/n2_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu April 5, 2016, 12:46 p.m. UTC | #1
On Fri, Mar 18, 2016 at 07:08:48PM +0530, Amitoj Kaur Chawla wrote:
> Return statement at the end of a void function is useless.
> 
> The Coccinelle semantic patch used to make this change is as follows:
> //<smpl>
> @@
> identifier f;
> expression e;
> @@
> void f(...) {
> <...
> - return
>   e;
> ...>
> }
> //</smpl>
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

Applied.
diff mbox

Patch

diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index b85a7a7..c5aac25 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1598,7 +1598,7 @@  static void *new_queue(unsigned long q_type)
 
 static void free_queue(void *p, unsigned long q_type)
 {
-	return kmem_cache_free(queue_cache[q_type - 1], p);
+	kmem_cache_free(queue_cache[q_type - 1], p);
 }
 
 static int queue_cache_init(void)