mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 19:31:53 +00:00
staging: rtl8712: Change return values in r8712_init_cmd_priv()
Change return values in r8712_init_cmd_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
4a808fa3aa
commit
d91674322d
@ -297,7 +297,7 @@ static u8 init_default_value(struct _adapter *padapter)
|
||||
|
||||
u8 r8712_init_drv_sw(struct _adapter *padapter)
|
||||
{
|
||||
if ((r8712_init_cmd_priv(&padapter->cmdpriv)) == _FAIL)
|
||||
if (r8712_init_cmd_priv(&padapter->cmdpriv))
|
||||
return _FAIL;
|
||||
padapter->cmdpriv.padapter = padapter;
|
||||
if ((r8712_init_evt_priv(&padapter->evtpriv)) == _FAIL)
|
||||
|
@ -55,7 +55,7 @@ int r8712_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
pcmdpriv->cmd_allocated_buf = kmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
|
||||
GFP_ATOMIC);
|
||||
if (!pcmdpriv->cmd_allocated_buf)
|
||||
return _FAIL;
|
||||
return -ENOMEM;
|
||||
pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ -
|
||||
((addr_t)(pcmdpriv->cmd_allocated_buf) &
|
||||
(CMDBUFF_ALIGN_SZ - 1));
|
||||
@ -63,14 +63,14 @@ int r8712_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
if (!pcmdpriv->rsp_allocated_buf) {
|
||||
kfree(pcmdpriv->cmd_allocated_buf);
|
||||
pcmdpriv->cmd_allocated_buf = NULL;
|
||||
return _FAIL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
|
||||
((addr_t)(pcmdpriv->rsp_allocated_buf) & 3);
|
||||
pcmdpriv->cmd_issued_cnt = 0;
|
||||
pcmdpriv->cmd_done_cnt = 0;
|
||||
pcmdpriv->rsp_cnt = 0;
|
||||
return _SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static sint _init_evt_priv(struct evt_priv *pevtpriv)
|
||||
|
Loading…
Reference in New Issue
Block a user