diff options
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r-- | drivers/net/gianfar_ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index 25a8c2adb001..0caf3c323ec0 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -1669,10 +1669,10 @@ static int gfar_get_cls_all(struct gfar_private *priv, | |||
1669 | u32 i = 0; | 1669 | u32 i = 0; |
1670 | 1670 | ||
1671 | list_for_each_entry(comp, &priv->rx_list.list, list) { | 1671 | list_for_each_entry(comp, &priv->rx_list.list, list) { |
1672 | if (i <= cmd->rule_cnt) { | 1672 | if (i == cmd->rule_cnt) |
1673 | rule_locs[i] = comp->fs.location; | 1673 | return -EMSGSIZE; |
1674 | i++; | 1674 | rule_locs[i] = comp->fs.location; |
1675 | } | 1675 | i++; |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | cmd->data = MAX_FILER_IDX; | 1678 | cmd->data = MAX_FILER_IDX; |