bonding: Fix useless test: int > INT_MAX
authorNicolas de Pesloüan <nicolas.2p.debian@free.fr>
Fri, 28 Aug 2009 13:18:34 +0000 (13:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Aug 2009 06:01:16 +0000 (23:01 -0700)
max_bonds is of type int and cannot be greater than INT_MAX.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

index ed00ba919d91f24b0f7ac03f6a966641e9b58bd2..6b9f15b32a38d4f592cd309febc0eeff9692e622 100644 (file)
@@ -4759,7 +4759,7 @@ static int bond_check_params(struct bond_params *params)
                params->ad_select = BOND_AD_STABLE;
        }
 
-       if (max_bonds < 0 || max_bonds > INT_MAX) {
+       if (max_bonds < 0) {
                pr_warning(DRV_NAME
                       ": Warning: max_bonds (%d) not in range %d-%d, so it "
                       "was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",