]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Remove zero check
authorGreg Rose <gregory.v.rose@intel.com>
Tue, 12 Apr 2016 15:30:48 +0000 (08:30 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 17:41:10 +0000 (10:41 -0700)
Orabug: 23176970

A mirror rule ID may be zero so do not return invalid parameter when the
user passes in a zero value for a rule ID.

Change-ID: I261b8c24725ce2c6ed32f859da81093dfcbe2970
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit db0772782f6b99adbd8548e1d3830fe019c9f250)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_common.c

index 1db4790423f13a7ab23c933bb011f919382286b4..25872f2012c52e582d6c3162ed78da93ab84838e 100644 (file)
@@ -2668,10 +2668,7 @@ i40e_status i40e_aq_delete_mirrorrule(struct i40e_hw *hw, u16 sw_seid,
                        u16 *rules_used, u16 *rules_free)
 {
        /* Rule ID has to be valid except rule_type: INGRESS VLAN mirroring */
-       if (rule_type != I40E_AQC_MIRROR_RULE_TYPE_VLAN) {
-               if (!rule_id)
-                       return I40E_ERR_PARAM;
-       } else {
+       if (rule_type == I40E_AQC_MIRROR_RULE_TYPE_VLAN) {
                /* count and mr_list shall be valid for rule_type INGRESS VLAN
                 * mirroring. For other rule_type, count and rule_type should
                 * not matter.