ice: fix static analysis warnings
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 27 Feb 2019 00:35:07 +0000 (16:35 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Mar 2019 15:19:16 +0000 (08:19 -0700)
cppcheck warns "Identical condition '<var>', second condition is always
false". Fix them.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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_common.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_sched.c
drivers/net/ethernet/intel/ice/ice_switch.c

index d2e1e6f440b85aaca7fd306a56c47d476d272388..db6ec77506df01990f2ca73873f926aa9bdb175d 100644 (file)
@@ -331,7 +331,7 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,
        /* flag cleared so calling functions don't call AQ again */
        pi->phy.get_link_info = false;
 
-       return status;
+       return 0;
 }
 
 /**
index c75a4f4ae6e99a65360651d4ab2e5ca5ce769e5e..3fb01eb4d19e1c9417110fdb1e5d9bbeed09e9f3 100644 (file)
@@ -2647,7 +2647,7 @@ static int ice_up_complete(struct ice_vsi *vsi)
 
        ice_service_task_schedule(pf);
 
-       return err;
+       return 0;
 }
 
 /**
index 56049739a250455d7ec1fbb9b5102593c5d88d13..086a4c7254c5e8d0a468a12dfacf6cff3639bb0f 100644 (file)
@@ -1502,7 +1502,7 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
 
        vsi_ctx->sched.max_lanq[tc] = new_numqs;
 
-       return status;
+       return 0;
 }
 
 /**
index 09d1c314b68f39f982bc1eb49cfedae99b211c9b..0859650c13d0801f1e32c3eae4620b1a20d32e57 100644 (file)
@@ -398,7 +398,7 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
                        tmp_vsi_ctx->vsi_num = vsi_ctx->vsi_num;
        }
 
-       return status;
+       return 0;
 }
 
 /**