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: <20201223123833.14733-1-dinghao.liu@zju.edu.cn>
Date:   Wed, 23 Dec 2020 20:38:33 +0800
From:   Dinghao Liu <dinghao.liu@....edu.cn>
To:     dinghao.liu@....edu.cn, kjlu@....edu
Cc:     Christian Benvenuti <benve@...co.com>,
        Govindarajulu Varadarajan <_govind@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] enic: Remove redundant free in enic_set_ringparam

The error handling paths in enic_alloc_vnic_resources()
have called enic_free_vnic_resources() before returning.
So we may not need to call it again on failure at caller
side.

Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
---
 drivers/net/ethernet/cisco/enic/enic_ethtool.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
index 1a9803f2073e..85a139d39f27 100644
--- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
+++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
@@ -235,7 +235,6 @@ static int enic_set_ringparam(struct net_device *netdev,
 	if (err) {
 		netdev_err(netdev,
 			   "Failed to alloc vNIC resources, aborting\n");
-		enic_free_vnic_resources(enic);
 		goto err_out;
 	}
 	enic_init_vnic_resources(enic);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ