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>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Mar 2022 18:33:21 +0800
From:   Haowen Bai <baihaowen@...zu.com>
To:     <Larry.Finger@...inger.net>, <phil@...lpotter.co.uk>,
        <gregkh@...uxfoundation.org>
CC:     <linux-staging@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
        "Haowen Bai" <baihaowen@...zu.com>
Subject: [PATCH] staging: r8188eu: simplify unnecessary NULL check

remove the optimisation of NULL checking it inline, kfree/rtw_free_netdev
will take care if that would ever be the case.

Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
 drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 91792df..8d1ac48 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -425,10 +425,8 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 		rtw_handle_dualmac(padapter, 0);
 free_adapter:
 	if (status != _SUCCESS) {
-		if (pnetdev)
-			rtw_free_netdev(pnetdev);
-		else if (padapter)
-			vfree(padapter);
+		rtw_free_netdev(pnetdev);
+		vfree(padapter);
 		padapter = NULL;
 	}
 exit:
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ