diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-13 02:44:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-13 02:44:53 +0200 |
commit | aa11d958d1a6572eda08214d7c6a735804fe48a5 (patch) | |
tree | d025b05270ad1e010660d17eeadc6ac3c1abbd7d /drivers/net/mlx4/en_rx.c | |
parent | net,pppoe: fixup module init/exit subsequent calls (diff) | |
parent | Revert "libertas: Read buffer overflow" (diff) | |
download | linux-aa11d958d1a6572eda08214d7c6a735804fe48a5.tar.xz linux-aa11d958d1a6572eda08214d7c6a735804fe48a5.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
arch/microblaze/include/asm/socket.h
Diffstat (limited to 'drivers/net/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/mlx4/en_rx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index cd084de322f4..03b781a7a182 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c @@ -462,8 +462,9 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, PCI_DMA_FROMDEVICE); } /* Adjust size of last fragment to match actual length */ - skb_frags_rx[nr - 1].size = length - - priv->frag_info[nr - 1].frag_prefix_size; + if (nr > 0) + skb_frags_rx[nr - 1].size = length - + priv->frag_info[nr - 1].frag_prefix_size; return nr; fail: |