[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221116122032.969666-1-przemyslaw.kitszel@intel.com>
Date: Wed, 16 Nov 2022 13:20:32 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: intel-wired-lan@...osl.org
Cc: netdev@...r.kernel.org,
Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: [PATCH net-next] ice: remove redundant non-null check in ice_setup_pf_sw()
From: Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>
Remove a redundant null check, as vsi could not be null at this point.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 962b791e3ac7..b2d35d7e9d49 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3786,13 +3786,11 @@ static int ice_setup_pf_sw(struct ice_pf *pf)
unroll_napi_add:
ice_tc_indir_block_unregister(vsi);
unroll_cfg_netdev:
- if (vsi) {
- ice_napi_del(vsi);
- if (vsi->netdev) {
- clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state);
- free_netdev(vsi->netdev);
- vsi->netdev = NULL;
- }
+ ice_napi_del(vsi);
+ if (vsi->netdev) {
+ clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state);
+ free_netdev(vsi->netdev);
+ vsi->netdev = NULL;
}
unroll_vsi_setup:
--
2.34.3
Powered by blists - more mailing lists