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
This commit is contained in:
Dimitry Andric 2012-08-06 18:51:14 +00:00
parent 1843e23c48
commit 25982a6e2d

View file

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