summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl8712_recv.c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-08 09:40:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-08 20:58:14 +0300
commit1bdcb3666a83e533feb35a5a86e4e8e01b44dc18 (patch)
tree9a392c5abcd2fa2d773a49d8f742ff35d727de04 /drivers/staging/rtl8712/rtl8712_recv.c
parent4dbadfaf6a77e3d9ffe7069a8f1a13ae0df00d56 (diff)
downloadlinux-1bdcb3666a83e533feb35a5a86e4e8e01b44dc18.tar.xz
staging: rtl8712: r8712_wlanhdr_to_ethhdr(): Change return values
Change return values of r8712_wlanhdr_to_ethhdr from _SUCCESS/_FAIL to 0/-ENOMEM. Modify the function containing a call site of r8712_wlanhdr_to_ethhdr so that it compares the return value to 0/-ENOMEM instead of _SUCCESS/_FAIL. Change the return type of r8712_wlanhdr_to_ethhdr from sint to int to match its prototype in corresponding .h file. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190808064012.12661-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_recv.c')
-rw-r--r--drivers/staging/rtl8712/rtl8712_recv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index 3950b2424b64..0c5712898653 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -638,8 +638,8 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,
}
} else { /*B/G mode*/
retval = r8712_wlanhdr_to_ethhdr(prframe);
- if (retval != _SUCCESS)
- return retval;
+ if (retval)
+ return _FAIL;
if (!padapter->driver_stopped && !padapter->surprise_removed) {
/* indicate this recv_frame */
r8712_recv_indicatepkt(padapter, prframe);