From 92098c1f0b6ab8eac2ccb465435c2fbeae6f6f6e Mon Sep 17 00:00:00 2001 From: Bhaktipriya Shridhar Date: Fri, 26 Feb 2016 15:10:18 +0530 Subject: [PATCH] staging: rtl8188eu: os_dep: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index d87b54711c0d..5a90ef6381a1 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -41,10 +41,7 @@ inline int RTW_STATUS_CODE(int error_code) u8 *_rtw_malloc(u32 sz) { - u8 *pbuf = NULL; - - pbuf = kmalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); - return pbuf; + return kmalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); } void *rtw_malloc2d(int h, int w, int size) -- 2.39.2