Commit 6257450f authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: Change return values of r8712_init_evt_priv()

Change return values of the function r8712_init_evt_priv from
_SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 795eb368
...@@ -300,7 +300,7 @@ u8 r8712_init_drv_sw(struct _adapter *padapter) ...@@ -300,7 +300,7 @@ u8 r8712_init_drv_sw(struct _adapter *padapter)
if (r8712_init_cmd_priv(&padapter->cmdpriv)) if (r8712_init_cmd_priv(&padapter->cmdpriv))
return _FAIL; return _FAIL;
padapter->cmdpriv.padapter = padapter; padapter->cmdpriv.padapter = padapter;
if ((r8712_init_evt_priv(&padapter->evtpriv)) == _FAIL) if (r8712_init_evt_priv(&padapter->evtpriv))
return _FAIL; return _FAIL;
if (r8712_init_mlme_priv(padapter) == _FAIL) if (r8712_init_mlme_priv(padapter) == _FAIL)
return _FAIL; return _FAIL;
......
...@@ -80,11 +80,11 @@ int r8712_init_evt_priv(struct evt_priv *pevtpriv) ...@@ -80,11 +80,11 @@ int r8712_init_evt_priv(struct evt_priv *pevtpriv)
pevtpriv->evt_allocated_buf = kmalloc(MAX_EVTSZ + 4, GFP_ATOMIC); pevtpriv->evt_allocated_buf = kmalloc(MAX_EVTSZ + 4, GFP_ATOMIC);
if (!pevtpriv->evt_allocated_buf) if (!pevtpriv->evt_allocated_buf)
return _FAIL; return -ENOMEM;
pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 - pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 -
((addr_t)(pevtpriv->evt_allocated_buf) & 3); ((addr_t)(pevtpriv->evt_allocated_buf) & 3);
pevtpriv->evt_done_cnt = 0; pevtpriv->evt_done_cnt = 0;
return _SUCCESS; return 0;
} }
static void _free_evt_priv(struct evt_priv *pevtpriv) static void _free_evt_priv(struct evt_priv *pevtpriv)
......
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