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]
Message-ID: <20240828132606.19878-1-amishin@t-argos.ru>
Date: Wed, 28 Aug 2024 16:26:06 +0300
From: Aleksandr Mishin <amishin@...rgos.ru>
To: Vadym Kochan <vadym.kochan@...ision.eu>
CC: Aleksandr Mishin <amishin@...rgos.ru>, Taras Chornyi
	<taras.chornyi@...ision.eu>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Oleksandr Mazur <oleksandr.mazur@...ision.eu>, Serhiy
 Boiko <serhiy.boiko@...ision.eu>, Volodymyr Mytnyk
	<volodymyr.mytnyk@...ision.eu>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: [PATCH net] net: marvell: prestera: Remove unneeded check in prestera_port_create()

prestera_port_create() calls prestera_rxtx_port_init() and analyze its
return code. prestera_rxtx_port_init() always returns 0, so this check is
unneeded and should be removed.

Remove unneeded check to clean up the code.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices")
Signed-off-by: Aleksandr Mishin <amishin@...rgos.ru>
---
 drivers/net/ethernet/marvell/prestera/prestera_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
index 63ae01954dfc..2d4f6d03b729 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
@@ -718,9 +718,7 @@ static int prestera_port_create(struct prestera_switch *sw, u32 id)
 		}
 	}
 
-	err = prestera_rxtx_port_init(port);
-	if (err)
-		goto err_port_init;
+	prestera_rxtx_port_init(port);
 
 	INIT_DELAYED_WORK(&port->cached_hw_stats.caching_dw,
 			  &prestera_port_stats_update);
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ