提交 f5841306 编写于 作者: N Nicolas de Pesloüan 提交者: David S. Miller

bonding: Fix useless test: int > INT_MAX

max_bonds is of type int and cannot be greater than INT_MAX.
Signed-off-by: NNicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 89c76c62
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册