ocfs2: fix possible uninitialized variable access
[firefly-linux-kernel-4.4.55.git] / fs / ocfs2 / localalloc.c
index 096cff6f9ba8e59448f04b4b0116ab9d525fb29e..857bbbcd39f3b6bbd7c8bc37ef463faa6c2cd77a 100644 (file)
@@ -839,7 +839,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
                                     u32 *numbits,
                                     struct ocfs2_alloc_reservation *resv)
 {
-       int numfound, bitoff, left, startoff, lastzero;
+       int numfound = 0, bitoff, left, startoff, lastzero;
        int local_resv = 0;
        struct ocfs2_alloc_reservation r;
        void *bitmap = NULL;