path: root/drivers/net/gianfar_ethtool.c
diff options
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-10-31 09:09:32 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-10-31 09:09:32 -0200
commit2c699499df3f57e62725fcd56842090fb5e82600 (patch)
tree5a9d5b3b5df3d98de92f605b7dee0815d03b5fc8 /drivers/net/gianfar_ethtool.c
parentddbb67caef2ecd0070c6ebed4d932c51ace1619f (diff)
parentc3b92c8787367a8bb53d57d9789b558f1295cc96 (diff)
Merge tag 'v3.1'old/cs_2c699499df3f
* tag 'v3.1': (537 commits) Linux 3.1 x86: Fix S4 regression dm kcopyd: fix job_pool leak ARM: S3C24XX: Fix s3c24xx build errors if !CONFIG_PM crypto: ghash - Avoid null pointer dereference if no key is set ARM: S5P: fix offset calculation on gpio-interrupt hwmon: (w83627ehf) Fix negative 8-bit temperature values mm: fix race between mremap and removing migration entry sparc: Add alignment flag to PCI expansion resources fib_rules: fix unresolved_rules counting r8169: fix wrong eee setting for rlt8111evl r8169: fix driver shutdown WoL regression. ehea: Change maintainer to me [media] videodev: fix a NULL pointer dereference in v4l2_device_release() intel-iommu: fix superpage support in pfn_to_dma_pte() intel-iommu: set iommu_superpage on VM domains to lowest common denominator intel-iommu: fix return value of iommu_unmap() API MAINTAINERS: Update VT-d entry for drivers/pci -> drivers/iommu move drm/radeon/kms/atom: fix handling of FB scratch indices pptp: pptp_rcv_core() misses pskb_may_pull() call ...
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
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,
u32 i = 0;
list_for_each_entry(comp, &priv->rx_list.list, list) {
- if (i <= cmd->rule_cnt) {
- rule_locs[i] = comp->fs.location;
- i++;
- }
+ if (i == cmd->rule_cnt)
+ return -EMSGSIZE;
+ rule_locs[i] = comp->fs.location;
+ i++;
cmd->data = MAX_FILER_IDX;

Privacy Policy