net/ice/base: remove unnecessary conditional check
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:40 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
There is no reason to do this conditional check before the assignment so
simply remove it.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_switch.c

index ef3a919..a4966d0 100644 (file)
@@ -1145,8 +1145,7 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
                ice_save_vsi_ctx(hw, vsi_handle, tmp_vsi_ctx);
        } else {
                /* update with new HW VSI num */
-               if (tmp_vsi_ctx->vsi_num != vsi_ctx->vsi_num)
-                       tmp_vsi_ctx->vsi_num = vsi_ctx->vsi_num;
+               tmp_vsi_ctx->vsi_num = vsi_ctx->vsi_num;
        }
 
        return ICE_SUCCESS;