svn commit: r239101 - head/sys/dev/cxgb/ulp/iw_cxgb

Dimitry Andric dim at FreeBSD.org
Mon Aug 6 18:51:14 UTC 2012


Author: dim
Date: Mon Aug  6 18:51:14 2012
New Revision: 239101
URL: http://svn.freebsd.org/changeset/base/239101

Log:
  In cxgb(4), in function iwch_reregister_phys_mem(), initialize the
  'npages' variable to zero, to avoid using it uninitialized in certain
  cases.
  
  Found by:	clang
  Reviewed by:	np
  MFC after:	1 week

Modified:
  head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c

Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
==============================================================================
--- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c	Mon Aug  6 18:44:59 2012	(r239100)
+++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c	Mon Aug  6 18:51:14 2012	(r239101)
@@ -487,7 +487,7 @@ static int iwch_reregister_phys_mem(stru
 	__be64 *page_list = NULL;
 	int shift = 0;
 	u64 total_size;
-	int npages;
+	int npages = 0;
 	int ret;
 
 	CTR3(KTR_IW_CXGB, "%s ib_mr %p ib_pd %p", __FUNCTION__, mr, pd);


More information about the svn-src-head mailing list