projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
805d157
)
bonding: remove the redundant judgements for bond_option_queue_id_set()
author
dingtianhong
<
[email protected]
>
Wed, 12 Feb 2014 06:58:50 +0000
(14:58 +0800)
committer
David S. Miller
<
[email protected]
>
Thu, 13 Feb 2014 22:49:13 +0000
(17:49 -0500)
The dev_valid_name() will check the buffer length for input name, no need to
check it twice.
Cc: Jay Vosburgh <
[email protected]
>
Cc: Veaceslav Falico <
[email protected]
>
Cc: Andy Gospodarek <
[email protected]
>
Signed-off-by: Ding Tianhong <
[email protected]
>
Reviewed-by: Jiri Pirko <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/bonding/bond_options.c
patch
|
blob
|
history
diff --git
a/drivers/net/bonding/bond_options.c
b/drivers/net/bonding/bond_options.c
index 11cb943222d5c839ed363715db445351e6b3da56..832d6e90b1b9d56bf8b36d1295ed97c7b80d692d 100644
(file)
--- 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,
goto err_no_cmd;
/* Check buffer length, valid ifname and queue id */
- if (strlen(newval->string) > IFNAMSIZ ||
- !dev_valid_name(newval->string) ||
+ if (!dev_valid_name(newval->string) ||
qid > bond->dev->real_num_tx_queues)
goto err_no_cmd;