staging: gdm72xx: Condense two statements into one to improve code readability.

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com>

This patch removes a variable assignmnet to a value, used only
for returning that value. The following coccinelle script was
used to discover it:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
     -return ret;

Signed-off-by: Navya Sri Nizamkari 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/gdm72xx/gdm_qos.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
 
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c
index af24c57..96bf2bf 100644
--- a/drivers/staging/gdm72xx/gdm_qos.c
+++ b/drivers/staging/gdm72xx/gdm_qos.c
@@ -54,8 +54,7 @@ static void *alloc_qos_entry(void)
 	}
 	spin_unlock_irqrestore(&qos_free_list.lock, flags);
 
-	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
-	return entry;
+	return kmalloc(sizeof(*entry), GFP_ATOMIC);
 }
 
 static void free_qos_entry(void *entry)
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.