From owner-svn-src-head@FreeBSD.ORG Thu May 5 17:28:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16FB9106564A; Thu, 5 May 2011 17:28:46 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03DCD8FC0C; Thu, 5 May 2011 17:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45HSjWP009115; Thu, 5 May 2011 17:28:45 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45HSjRN009113; Thu, 5 May 2011 17:28:45 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201105051728.p45HSjRN009113@svn.freebsd.org> From: Jack F Vogel Date: Thu, 5 May 2011 17:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221505 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 17:28:46 -0000 Author: jfv Date: Thu May 5 17:28:45 2011 New Revision: 221505 URL: http://svn.freebsd.org/changeset/base/221505 Log: 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. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu May 5 17:11:26 2011 (r221504) +++ head/sys/dev/e1000/if_em.c Thu May 5 17:28:45 2011 (r221505) @@ -3901,7 +3901,7 @@ em_setup_receive_ring(struct rx_ring *rx 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 *rx 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);