Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5841306 authored by Nicolas de Pesloüan's avatar Nicolas de Pesloüan Committed by David S. Miller
Browse files

bonding: Fix useless test: int > INT_MAX



max_bonds is of type int and cannot be greater than INT_MAX.

Signed-off-by: default avatarNicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89c76c62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",