diff options
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | 2019-06-26 11:39:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-01 10:44:06 +0200 |
commit | 7721483ca043c759cce0e316e15e942cba1f974c (patch) | |
tree | 3d4d32b7f5ae5997bde194dabc2461c64781bc63 /drivers/staging | |
parent | f5e5eaefa921550619b0f4fd82a758e31ccb065c (diff) |
staging: rtl8712: mp_start_test(): Change return values
Change return values of function mp_start_test() from _SUCCESS/_FAIL to
0/-ENOMEM and modify call sites accordingly.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c index 64fde5325a8e..aa8f8500cbb2 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c +++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c @@ -153,7 +153,7 @@ static int mp_start_test(struct _adapter *padapter) struct sta_info *psta; unsigned long length; unsigned long irqL; - int res = _SUCCESS; + int res = 0; /* 3 1. initialize a new struct wlan_bssid_ex */ memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); @@ -187,7 +187,7 @@ static int mp_start_test(struct _adapter *padapter) r8712_free_stainfo(padapter, psta); psta = r8712_alloc_stainfo(&padapter->stapriv, bssid.MacAddress); if (psta == NULL) { - res = _FAIL; + res = -ENOMEM; goto end_of_mp_start_test; } /* 3 3. join pseudo AdHoc */ @@ -262,7 +262,7 @@ uint oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv) return RNDIS_STATUS_NOT_ACCEPTED; mode = *((u32 *)poid_par_priv->information_buf); Adapter->mppriv.mode = mode;/* 1 for loopback*/ - if (mp_start_test(Adapter) == _FAIL) + if (mp_start_test(Adapter)) status = RNDIS_STATUS_NOT_ACCEPTED; r8712_write8(Adapter, MSR, 1); /* Link in ad hoc network, 0x1025004C */ r8712_write8(Adapter, RCR, 0); /* RCR : disable all pkt, 0x10250048 */ |