RDMA/cxgb3: Fix uninitialized variable
authorCong Ding <[email protected]>
Mon, 4 Feb 2013 22:18:06 +0000 (22:18 +0000)
committerRoland Dreier <[email protected]>
Wed, 17 Apr 2013 05:45:33 +0000 (22:45 -0700)
The variable npages might be used uninitialized.

Signed-off-by: Cong Ding <[email protected]>
Acked-by: Steve Wise <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
drivers/infiniband/hw/cxgb3/iwch_provider.c

index 9c12da0cbd32539b5a8060a7a6deed8101cdd25d..e87f2201b220673030ca18a3957642b623d065a7 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);