diff mbox

Fix velocity driver unmapping incorrect size.

Message ID 20090622033735.GA9923@redhat.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Dave Jones June 22, 2009, 3:37 a.m. UTC
Oh man, this was subtle.  How did this never bite us before ?

Comments

Dave Jones June 22, 2009, 5:15 a.m. UTC | #1
On Sun, Jun 21, 2009 at 11:37:35PM -0400, Dave Jones wrote:
 > Oh man, this was subtle.  How did this never bite us before ?
 
bah. I introduced that back in 59f8e169e25c5fce91826412c38359ecaf940b82

I suck at ternary operators.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index b02f7ad..46405e9 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1847,7 +1847,7 @@  static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_
 	 */
 	if (tdinfo->skb_dma) {
 
-		pktlen = (skb->len > ETH_ZLEN ? : ETH_ZLEN);
+		pktlen = (skb->len > ETH_ZLEN ? skb->len : ETH_ZLEN);
 		for (i = 0; i < tdinfo->nskb_dma; i++) {
 #ifdef VELOCITY_ZERO_COPY_SUPPORT
 			pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], le16_to_cpu(td->tdesc1.len), PCI_DMA_TODEVICE);