From 1862eec4fe45e2d33fb166af3f8e601fc2233d76 Mon Sep 17 00:00:00 2001 From: Navya Sri Nizamkari Date: Fri, 27 Feb 2015 21:28:29 +0530 Subject: [PATCH] staging: gdm72xx: Condense two statements into one to improve code readability. 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 af24c57b8232..96bf2bf87ff4 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) -- 2.30.2