From: Brice Goglin Date: Tue, 3 Jun 2008 23:07:45 +0000 (-0700) Subject: net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec X-Git-Tag: v2.6.26-rc5~1^2~24 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7557af25155a82ac2dad73eec6b0166868bf8ea2;p=linux-2.6 net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec No need to compute copy twice in the frags loop in dma_skb_copy_datagram_iovec(). Signed-off-by: Brice Goglin Acked-by: Shannon Nelson Signed-off-by: Maciej Sosnowski Signed-off-by: Dan Williams Signed-off-by: David S. Miller --- diff --git a/net/core/user_dma.c b/net/core/user_dma.c index 0ad1cd57bc..c77aff9c6e 100644 --- a/net/core/user_dma.c +++ b/net/core/user_dma.c @@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan, end = start + skb_shinfo(skb)->frags[i].size; copy = end - offset; - if ((copy = end - offset) > 0) { + if (copy > 0) { skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; struct page *page = frag->page;