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: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
795eb36899
commit
6257450f89
|
@ -300,7 +300,7 @@ u8 r8712_init_drv_sw(struct _adapter *padapter)
|
|||
if (r8712_init_cmd_priv(&padapter->cmdpriv))
|
||||
return _FAIL;
|
||||
padapter->cmdpriv.padapter = padapter;
|
||||
if ((r8712_init_evt_priv(&padapter->evtpriv)) == _FAIL)
|
||||
if (r8712_init_evt_priv(&padapter->evtpriv))
|
||||
return _FAIL;
|
||||
if (r8712_init_mlme_priv(padapter) == _FAIL)
|
||||
return _FAIL;
|
||||
|
|
|
@ -80,11 +80,11 @@ int r8712_init_evt_priv(struct evt_priv *pevtpriv)
|
|||
pevtpriv->evt_allocated_buf = kmalloc(MAX_EVTSZ + 4, GFP_ATOMIC);
|
||||
|
||||
if (!pevtpriv->evt_allocated_buf)
|
||||
return _FAIL;
|
||||
return -ENOMEM;
|
||||
pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 -
|
||||
((addr_t)(pevtpriv->evt_allocated_buf) & 3);
|
||||
pevtpriv->evt_done_cnt = 0;
|
||||
return _SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void _free_evt_priv(struct evt_priv *pevtpriv)
|
||||
|
|
Loading…
Reference in New Issue