From 25982a6e2d52a70ed5eefcf7b1829a65ba6e423c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 6 Aug 2012 18:51:14 +0000 Subject: [PATCH] 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 --- sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c index 4961395bfad..9d6944aa1d7 100644 --- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c +++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c @@ -487,7 +487,7 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr, __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);