diff options
author | dingtianhong <dingtianhong@huawei.com> | 2014-02-12 01:58:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-13 17:49:13 -0500 |
commit | c313c89edb93eeac0646dcc6d6cb7fb404d4056d (patch) | |
tree | 1883d239bf7b2c2ff4492275551bd26cd803dc04 | |
parent | 805d157e8f4273eeafeeab53c3a5d295ac0d9208 (diff) |
bonding: remove the redundant judgements for bond_option_queue_id_set()
The dev_valid_name() will check the buffer length for input name, no need to
check it twice.
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_options.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 11cb943222d5..832d6e90b1b9 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c | |||
@@ -1199,8 +1199,7 @@ int bond_option_queue_id_set(struct bonding *bond, | |||
1199 | goto err_no_cmd; | 1199 | goto err_no_cmd; |
1200 | 1200 | ||
1201 | /* Check buffer length, valid ifname and queue id */ | 1201 | /* Check buffer length, valid ifname and queue id */ |
1202 | if (strlen(newval->string) > IFNAMSIZ || | 1202 | if (!dev_valid_name(newval->string) || |
1203 | !dev_valid_name(newval->string) || | ||
1204 | qid > bond->dev->real_num_tx_queues) | 1203 | qid > bond->dev->real_num_tx_queues) |
1205 | goto err_no_cmd; | 1204 | goto err_no_cmd; |
1206 | 1205 | ||