diff options
author | jfv <jfv@FreeBSD.org> | 2011-05-05 17:28:45 +0000 |
---|---|---|
committer | jfv <jfv@FreeBSD.org> | 2011-05-05 17:28:45 +0000 |
commit | 528ebf60dadc40d475bb74cbcf024bee614a07bb (patch) | |
tree | e8aa58e915144bda6e126ace2873e9b82cbee5ef | |
parent | e808412d86c59367fb89f95ca70fdb8794136f21 (diff) | |
download | FreeBSD-src-528ebf60dadc40d475bb74cbcf024bee614a07bb.zip FreeBSD-src-528ebf60dadc40d475bb74cbcf024bee614a07bb.tar.gz |
Add an initialization to the error variable, without
this there is a rare return path that bogusly appears
to fail when it should not. Also white space correction.
Thanks to Arnaud Lacombe for noticing the problem.
-rw-r--r-- | sys/dev/e1000/if_em.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index fb6ed67..156f8b2 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3901,7 +3901,7 @@ em_setup_receive_ring(struct rx_ring *rxr) struct adapter *adapter = rxr->adapter; struct em_buffer *rxbuf; bus_dma_segment_t seg[1]; - int i, j, nsegs, error; + int i, j, nsegs, error = 0; /* Clear the ring contents */ @@ -3919,7 +3919,7 @@ em_setup_receive_ring(struct rx_ring *rxr) if (++j == adapter->num_rx_desc) j = 0; - while(j != rxr->next_to_check) { + while (j != rxr->next_to_check) { rxbuf = &rxr->rx_buffers[i]; rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); |