Message ID | 20221116122032.969666-1-przemyslaw.kitszel@intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] ice: remove redundant non-null check in ice_setup_pf_sw() | expand |
On Wed, Nov 16, 2022 at 01:20:32PM +0100, Przemek Kitszel wrote: > From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> > > Remove a redundant null check, as vsi could not be null at this point. > > Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> > Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> > --- > drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Przemek Kitszel > Sent: Wednesday, November 16, 2022 5:51 PM > To: intel-wired-lan@osuosl.org > Cc: netdev@vger.kernel.org; Kitszel, Przemyslaw > <przemyslaw.kitszel@intel.com> > Subject: [Intel-wired-lan] [PATCH net-next] ice: remove redundant non-null > check in ice_setup_pf_sw() > > From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> > > Remove a redundant null check, as vsi could not be null at this point. > > Signed-off-by: Anirudh Venkataramanan > <anirudh.venkataramanan@intel.com> > Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> > --- > drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
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: