[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210621153238.13147-4-ihuguet@redhat.com>
Date: Mon, 21 Jun 2021 17:32:38 +0200
From: Íñigo Huguet <ihuguet@...hat.com>
To: ecree.xilinx@...il.com, habetsm.xilinx@...il.com,
davem@...emloft.net, kuba@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
ihuguet@...hat.com, ivecera@...hat.com
Subject: [PATCH 4/4] sfc: avoid duplicated code in ef10_sriov
The fail path of efx_ef10_sriov_alloc_vf_vswitching is identical to the
full content of efx_ef10_sriov_free_vf_vswitching, so replace it for a
single call to efx_ef10_sriov_free_vf_vswitching.
Signed-off-by: Íñigo Huguet <ihuguet@...hat.com>
---
drivers/net/ethernet/sfc/ef10_sriov.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index f8f8fbe51ef8..752d6406f07e 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -206,9 +206,7 @@ static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx)
return 0;
fail:
- efx_ef10_sriov_free_vf_vports(efx);
- kfree(nic_data->vf);
- nic_data->vf = NULL;
+ efx_ef10_sriov_free_vf_vswitching(efx);
return rc;
}
--
2.31.1
Powered by blists - more mailing lists