提交 d5a6df44 编写于 作者: A Anirudh Venkataramanan 提交者: Tony Nguyen

ice: remove redundant non-null check in ice_setup_pf_sw()

Remove a redundant null check, as vsi could not be null at this point.
Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: NPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 8aa4318c
...@@ -3780,13 +3780,11 @@ static int ice_setup_pf_sw(struct ice_pf *pf) ...@@ -3780,13 +3780,11 @@ static int ice_setup_pf_sw(struct ice_pf *pf)
unroll_napi_add: unroll_napi_add:
ice_tc_indir_block_unregister(vsi); ice_tc_indir_block_unregister(vsi);
unroll_cfg_netdev: unroll_cfg_netdev:
if (vsi) { ice_napi_del(vsi);
ice_napi_del(vsi); if (vsi->netdev) {
if (vsi->netdev) { clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state);
clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state); free_netdev(vsi->netdev);
free_netdev(vsi->netdev); vsi->netdev = NULL;
vsi->netdev = NULL;
}
} }
unroll_vsi_setup: unroll_vsi_setup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册