tree-wide: fix assorted typos all over the place
[linux-2.6.git] / drivers / net / mlx4 / en_rx.c
index cd084de..829b9ec 100644 (file)
@@ -204,7 +204,7 @@ static void mlx4_en_free_rx_desc(struct mlx4_en_priv *priv,
                en_dbg(DRV, priv, "Freeing fragment:%d\n", nr);
                dma = be64_to_cpu(rx_desc->data[nr].addr);
 
-               en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma);
+               en_dbg(DRV, priv, "Unmapping buffer at dma:0x%llx\n", (u64) dma);
                pci_unmap_single(mdev->pdev, dma, skb_frags[nr].size,
                                 PCI_DMA_FROMDEVICE);
                put_page(skb_frags[nr].page);
@@ -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: