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

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
...@@ -798,7 +798,6 @@ void ice_sched_cleanup_all(struct ice_hw *hw) ...@@ -798,7 +798,6 @@ void ice_sched_cleanup_all(struct ice_hw *hw)
hw->layer_info = NULL; hw->layer_info = NULL;
} }
if (hw->port_info)
ice_sched_clear_port(hw->port_info); ice_sched_clear_port(hw->port_info);
hw->num_tx_sched_layers = 0; hw->num_tx_sched_layers = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment