RDMA/cxgb3: Fix uninitialized variable
authorCong Ding <dinggnu@gmail.com>
Mon, 4 Feb 2013 22:18:06 +0000 (22:18 +0000)
committerRoland Dreier <roland@purestorage.com>
Wed, 17 Apr 2013 05:45:33 +0000 (22:45 -0700)
The variable npages might be used uninitialized.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb3/iwch_provider.c

index 9c12da0..e87f220 100644 (file)
@@ -559,7 +559,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;
 
        PDBG("%s ib_mr %p ib_pd %p\n", __func__, mr, pd);