rtw_init_cmd_priv() always returns _SUCCESS, which is fine since it only calls void initializers. Thus, make it void and remove code checking for its return value.
Signed-off-by: Luca Ceresoli <l...@lucaceresoli.net> Cc: Larry Finger <larry.fin...@lwfinger.net> Cc: Greg Kroah-Hartman <gre...@linux.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 +-- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 7 +------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index bb275857c81d..0ebf65c87dc0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -244,13 +244,12 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. No irqsave is necessary. */ -int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) +void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { sema_init(&(pcmdpriv->cmd_queue_sema), 0); sema_init(&(pcmdpriv->terminate_cmdthread_sema), 0); _rtw_init_queue(&(pcmdpriv->cmd_queue)); - return _SUCCESS; } /* diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index cc37da9df95f..49b10d105274 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -67,7 +67,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, diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 2361bce480c3..6ec881952029 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -863,12 +863,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_init_drv_sw\n")); - 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; if (rtw_init_mlme_priv(padapter) == _FAIL) { -- 1.9.1 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel