aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/os_dep/recv_linux.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-08-07 16:06:30 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-07 15:17:59 -0700
commit469d3807e7f99f950348af5f031a580f13863263 (patch)
tree4809a5515c948845b55d85f9171ab44930c4b8cd /drivers/staging/rtl8188eu/os_dep/recv_linux.c
parentstaging: rtl8188eu: make function void (diff)
downloadlinux-dev-469d3807e7f99f950348af5f031a580f13863263.tar.xz
linux-dev-469d3807e7f99f950348af5f031a580f13863263.zip
staging: rtl8188eu: rearrange code
Re-arrange the code to directly return success or failure, thus removing the variable used in the function. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep/recv_linux.c')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/recv_linux.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 49d88455dbb4..3350bf35fb28 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -39,14 +39,12 @@ void rtw_os_recv_resource_alloc(struct recv_frame *precvframe)
int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
struct recv_buf *precvbuf)
{
- int res = _SUCCESS;
-
- precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
- if (precvbuf->purb == NULL)
- res = _FAIL;
precvbuf->pskb = NULL;
precvbuf->reuse = false;
- return res;
+ precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!precvbuf->purb)
+ return _FAIL;
+ return _SUCCESS;
}
void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)