[PATCH] enic: Remove redundant free in enic_set_ringparam

From: Dinghao Liu
Date: Wed Dec 23 2020 - 07:40:09 EST


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@xxxxxxxxxx>
---
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