lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YYgCHkVXFQ4r9dVp@Sauravs-MacBook-Air.local>
Date:   Sun, 7 Nov 2021 22:13:10 +0530
From:   Saurav Girepunje <saurav.girepunje@...il.com>
To:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        gregkh@...uxfoundation.org, straube.linux@...il.com,
        saurav.girepunje@...il.com, martin@...ser.cx,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: [PATCH] staging: r8188eu: os_dep: Change the return type of function

Change the return type of rtw_init_default_value function
from u8 to void. This function always return success. This
is called from rtw_init_drv_sw where the return value from
this function is assign to local variable but the local variable
value is never checked. After change the return type to void
remove the local variable ret8 in rtw_init_drv_sw function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
---
 drivers/staging/r8188eu/os_dep/os_intfs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index ec96e837ab88..6b38b2d26d8b 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -398,7 +398,7 @@ void rtw_stop_drv_threads(struct adapter *padapter)
 		_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
 }

-static u8 rtw_init_default_value(struct adapter *padapter)
+static void rtw_init_default_value(struct adapter *padapter)
 {
 	struct registry_priv *pregistrypriv = &padapter->registrypriv;
 	struct xmit_priv	*pxmitpriv = &padapter->xmitpriv;
@@ -443,7 +443,6 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 	padapter->bRxRSSIDisplay = 0;
 	padapter->bNotifyChannelChange = 0;
 	padapter->bShowGetP2PState = 1;
-	return _SUCCESS;
 }

 u8 rtw_reset_drv_sw(struct adapter *padapter)
@@ -478,8 +477,6 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)

 u8 rtw_init_drv_sw(struct adapter *padapter)
 {
-	u8	ret8 = _SUCCESS;
-
 	if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL)
 		return _FAIL;

@@ -519,7 +516,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)

 	rtw_init_pwrctrl_priv(padapter);

-	ret8 = rtw_init_default_value(padapter);
+	rtw_init_default_value(padapter);

 	rtl8188e_init_dm_priv(padapter);
 	rtl8188eu_InitSwLeds(padapter);
@@ -528,7 +525,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)

 	spin_lock_init(&padapter->br_ext_lock);

-	return ret8;
+	return _SUCCESS;
 }

 void rtw_cancel_all_timer(struct adapter *padapter)
--
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ