Commit 1748ce80 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

ice: remove pointless NULL check of port_info



The code in ice_sched_cleanup_all checks whether the port info is NULL
prior to calling ice_sched_clear_port. However, ice_sched_clear_port
already checks whether port info is non-NULL.

More importantly, it also checks whether the port structure has been
initialized by checking its port_state field as well.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 87324e74
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -798,7 +798,6 @@ void ice_sched_cleanup_all(struct ice_hw *hw)
		hw->layer_info = NULL;
	}

	if (hw->port_info)
	ice_sched_clear_port(hw->port_info);

	hw->num_tx_sched_layers = 0;