Commit c313c89e authored by dingtianhong's avatar dingtianhong Committed by David S. Miller

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: default avatarDing Tianhong <dingtianhong@huawei.com>
Reviewed-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 805d157e
...@@ -1199,8 +1199,7 @@ int bond_option_queue_id_set(struct bonding *bond, ...@@ -1199,8 +1199,7 @@ int bond_option_queue_id_set(struct bonding *bond,
goto err_no_cmd; goto err_no_cmd;
/* Check buffer length, valid ifname and queue id */ /* Check buffer length, valid ifname and queue id */
if (strlen(newval->string) > IFNAMSIZ || if (!dev_valid_name(newval->string) ||
!dev_valid_name(newval->string) ||
qid > bond->dev->real_num_tx_queues) qid > bond->dev->real_num_tx_queues)
goto err_no_cmd; goto err_no_cmd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment