From b9eb3126181ad625334e65af05b9af552253e716 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sat, 30 Jul 2022 16:39:38 +0200 Subject: [PATCH] staging: r8188eu: make rtw_handle_dualmac a void function The rtw_handle_dualmac function always returns _SUCCESS. Remove the return value and update the one caller that checks it. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220730143939.671951-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/core/rtw_wlan_util.c | 5 +---- drivers/staging/r8188eu/include/drv_types.h | 2 +- drivers/staging/r8188eu/os_dep/usb_intf.c | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c index 3a002cb..235dbf3 100644 --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c @@ -1578,10 +1578,8 @@ void beacon_timing_control(struct adapter *padapter) static struct adapter *pbuddy_padapter; -int rtw_handle_dualmac(struct adapter *adapter, bool init) +void rtw_handle_dualmac(struct adapter *adapter, bool init) { - int status = _SUCCESS; - if (init) { if (!pbuddy_padapter) { pbuddy_padapter = adapter; @@ -1594,5 +1592,4 @@ int rtw_handle_dualmac(struct adapter *adapter, bool init) } else { pbuddy_padapter = NULL; } - return status; } diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h index bba88a0..9f8a8d3 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -222,7 +222,7 @@ struct adapter { #define adapter_to_dvobj(adapter) (adapter->dvobj) -int rtw_handle_dualmac(struct adapter *adapter, bool init); +void rtw_handle_dualmac(struct adapter *adapter, bool init); static inline u8 *myid(struct eeprom_priv *peepriv) { diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index e1a0447..4dbdffa 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -306,8 +306,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, padapter->hw_init_mutex = &usb_drv->hw_init_mutex; - if (rtw_handle_dualmac(padapter, 1) != _SUCCESS) - goto free_adapter; + rtw_handle_dualmac(padapter, 1); pnetdev = rtw_init_netdev(padapter); if (!pnetdev) @@ -370,7 +369,6 @@ free_drv_sw: rtw_free_drv_sw(padapter); handle_dualmac: rtw_handle_dualmac(padapter, 0); -free_adapter: if (pnetdev) rtw_free_netdev(pnetdev); else -- 2.7.4