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.
This commit is contained in:
jfv 2011-05-05 17:28:45 +00:00
parent e808412d86
commit 528ebf60da

View File

@ -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);