Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: init_mp_priv(): Change return values

Change return values of init_mp_priv from _SUCCESS/_FAIL to 0/-ENOMEM
respectively.
Remove label that returns the required value and return the values
directly as they are set.
Consequently remove now-unnecessary return variable.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190722092341.21030-5-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Nishka Dasgupta and committed by
Greg Kroah-Hartman
42ceb673 7c93fdf0

+3 -6
+3 -6
drivers/staging/rtl8712/rtl871x_mp.c
··· 35 35 36 36 static int init_mp_priv(struct mp_priv *pmp_priv) 37 37 { 38 - int i, res; 38 + int i; 39 39 struct mp_xmit_frame *pmp_xmitframe; 40 40 41 41 _init_mp_priv_(pmp_priv); ··· 45 45 sizeof(struct mp_xmit_frame) + 4, 46 46 GFP_ATOMIC); 47 47 if (!pmp_priv->pallocated_mp_xmitframe_buf) { 48 - res = _FAIL; 49 - goto _exit_init_mp_priv; 48 + return -ENOMEM; 50 49 } 51 50 pmp_priv->pmp_xmtframe_buf = pmp_priv->pallocated_mp_xmitframe_buf + 52 51 4 - ··· 61 62 pmp_xmitframe++; 62 63 } 63 64 pmp_priv->free_mp_xmitframe_cnt = NR_MP_XMITFRAME; 64 - res = _SUCCESS; 65 - _exit_init_mp_priv: 66 - return res; 65 + return 0; 67 66 } 68 67 69 68 static int free_mp_priv(struct mp_priv *pmp_priv)