diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-03-01 02:18:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-03 15:29:42 -0500 |
commit | de39d7a4f3693c4247135cbce42716bf2a113577 (patch) | |
tree | 0345345d829564784336e07d6a59690624850d1e /net | |
parent | 635d61a3735e05c8da72740006670f819e5b6a5f (diff) |
hsr: off by one sanity check in hsr_register_frame_in()
This is a sanity check and we never pass invalid values so this patch
doesn't change anything. However the node->time_in[] array has
HSR_MAX_SLAVE (2) elements and not HSR_MAX_DEV (3).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/hsr/hsr_framereg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index 327060c6c874..7ae0d7f6dbd0 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -297,7 +297,7 @@ static bool seq_nr_after(u16 a, u16 b) void hsr_register_frame_in(struct node_entry *node, enum hsr_dev_idx dev_idx) { - if ((dev_idx < 0) || (dev_idx >= HSR_MAX_DEV)) { + if ((dev_idx < 0) || (dev_idx >= HSR_MAX_SLAVE)) { WARN_ONCE(1, "%s: Invalid dev_idx (%d)\n", __func__, dev_idx); return; } |