staging: rtl8188eu: rtw_init_cmd_priv never fails
authorMartin Kaiser <martin@kaiser.cx>
Wed, 5 May 2021 20:26:18 +0000 (22:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:41 +0000 (11:19 +0200)
Change the return type to void. Remove unnecessary error handling.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/include/rtw_cmd.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c

index 6728391..61d0342 100644 (file)
@@ -52,13 +52,12 @@ static struct _cmd_callback rtw_cmd_callback[] = {
  * No irqsave is necessary.
  */
 
-int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
+void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
        init_completion(&pcmdpriv->cmd_queue_comp);
        init_completion(&pcmdpriv->terminate_cmdthread_comp);
 
        _rtw_init_queue(&pcmdpriv->cmd_queue);
-       return _SUCCESS;
 }
 
 /*
index 68b8ad1..cb0eb4a 100644 (file)
@@ -54,7 +54,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd);
 
 int rtw_cmd_thread(void *context);
 
-int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
+void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
 
 enum rtw_drvextra_cmd_id {
        NONE_WK_CID,
index a826228..55ed721 100644 (file)
@@ -424,11 +424,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
 
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+%s\n", __func__));
 
-       if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
-               RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init cmd_priv\n"));
-               ret8 = _FAIL;
-               goto exit;
-       }
+       rtw_init_cmd_priv(&padapter->cmdpriv);
 
        padapter->cmdpriv.padapter = padapter;