OSDN Git Service

ice: remove pointless NULL check of port_info
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 8 Nov 2019 14:23:30 +0000 (06:23 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Nov 2019 21:43:42 +0000 (13:43 -0800)
commit1748ce80e0a3d4a66667fd154623aa1c33a44875
tree7b4724e213f9670c7c17079ff33c4ecd94988021
parent87324e747fde7693620f6d4c74aa11b7551e096d
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: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_sched.c