diff options
author | Madhumitha Prabakaran <madhumithabiw@gmail.com> | 2019-03-18 18:12:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 14:32:35 +0100 |
commit | cfd587d6b1f79e19e71ca1b8c36f5e66e939f399 (patch) | |
tree | 2ba25ace7c97bef70cec2eb10bc06a109fa14dad | |
parent | 91734498219640b29344659a825beaab6ee7ca1f (diff) |
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>
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index b67a5f9c27fa..32d8ff9e41bd 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -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; } diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 5c0fbf5170cc..9021bf519605 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -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; |