Commit 3e67274a authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: r8712_init_mlme_priv(): Change return values

Change return values of r8712_init_mlme_priv from _SUCCESS/_FAIL to
0/-ENOMEM respectively. Modify call site accordingly.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190722092341.21030-1-nishkadg.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec2b26f7
...@@ -302,7 +302,7 @@ u8 r8712_init_drv_sw(struct _adapter *padapter) ...@@ -302,7 +302,7 @@ u8 r8712_init_drv_sw(struct _adapter *padapter)
padapter->cmdpriv.padapter = padapter; padapter->cmdpriv.padapter = padapter;
if (r8712_init_evt_priv(&padapter->evtpriv)) if (r8712_init_evt_priv(&padapter->evtpriv))
return _FAIL; return _FAIL;
if (r8712_init_mlme_priv(padapter) == _FAIL) if (r8712_init_mlme_priv(padapter))
return _FAIL; return _FAIL;
_r8712_init_xmit_priv(&padapter->xmitpriv, padapter); _r8712_init_xmit_priv(&padapter->xmitpriv, padapter);
_r8712_init_recv_priv(&padapter->recvpriv, padapter); _r8712_init_recv_priv(&padapter->recvpriv, padapter);
......
...@@ -53,7 +53,7 @@ int r8712_init_mlme_priv(struct _adapter *padapter) ...@@ -53,7 +53,7 @@ int r8712_init_mlme_priv(struct _adapter *padapter)
pbuf = kmalloc_array(MAX_BSS_CNT, sizeof(struct wlan_network), pbuf = kmalloc_array(MAX_BSS_CNT, sizeof(struct wlan_network),
GFP_ATOMIC); GFP_ATOMIC);
if (!pbuf) if (!pbuf)
return _FAIL; return -ENOMEM;
pmlmepriv->free_bss_buf = pbuf; pmlmepriv->free_bss_buf = pbuf;
pnetwork = (struct wlan_network *)pbuf; pnetwork = (struct wlan_network *)pbuf;
for (i = 0; i < MAX_BSS_CNT; i++) { for (i = 0; i < MAX_BSS_CNT; i++) {
...@@ -67,7 +67,7 @@ int r8712_init_mlme_priv(struct _adapter *padapter) ...@@ -67,7 +67,7 @@ int r8712_init_mlme_priv(struct _adapter *padapter)
pmlmepriv->sitesurveyctrl.traffic_busy = false; pmlmepriv->sitesurveyctrl.traffic_busy = false;
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
r8712_init_mlme_timer(padapter); r8712_init_mlme_timer(padapter);
return _SUCCESS; return 0;
} }
struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv) struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment