staging: gdm72xx: Condense two statements into one to improve code readability.
authorNavya Sri Nizamkari <navyasri.tech@gmail.com>
Fri, 27 Feb 2015 15:58:29 +0000 (21:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:57:36 +0000 (16:57 -0800)
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 <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/gdm_qos.c

index af24c57b82322a8cac7a1712125fe40a8a0ea51e..96bf2bf87ff4b657a8ba9770e553543a74878378 100644 (file)
@@ -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)