mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Staging: rtl8723bs: Change values to standard error codes in functions
Change values for standard error codes in functions rtw_init_cmd_priv and rtw_init_evt_priv, as _SUCCESS should be 0 and _FAIL should be -ENOMEM. Also, change the values in corresponding call sites of the functions. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9173449821
commit
cfd587d6b1
2 changed files with 5 additions and 5 deletions
|
|
@ -164,7 +164,7 @@ No irqsave is necessary.
|
|||
|
||||
int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
{
|
||||
int res = _SUCCESS;
|
||||
int res = 0;
|
||||
|
||||
init_completion(&pcmdpriv->cmd_queue_comp);
|
||||
init_completion(&pcmdpriv->terminate_cmdthread_comp);
|
||||
|
|
@ -178,7 +178,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
|||
pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ);
|
||||
|
||||
if (pcmdpriv->cmd_allocated_buf == NULL) {
|
||||
res = _FAIL;
|
||||
res = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
|||
pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
|
||||
|
||||
if (pcmdpriv->rsp_allocated_buf == NULL) {
|
||||
res = _FAIL;
|
||||
res = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -754,7 +754,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
|
|||
|
||||
rtw_init_hal_com_default_value(padapter);
|
||||
|
||||
if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
|
||||
if (rtw_init_cmd_priv(&padapter->cmdpriv)) {
|
||||
RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init cmd_priv\n"));
|
||||
ret8 = _FAIL;
|
||||
goto exit;
|
||||
|
|
@ -762,7 +762,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
|
|||
|
||||
padapter->cmdpriv.padapter = padapter;
|
||||
|
||||
if ((rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) {
|
||||
if (rtw_init_evt_priv(&padapter->evtpriv)) {
|
||||
RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init evt_priv\n"));
|
||||
ret8 = _FAIL;
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Reference in a new issue