]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MD RAID10: Fix compiler warning.
authorJonathan Brassow <jbrassow@redhat.com>
Thu, 19 Jul 2012 10:49:57 +0000 (20:49 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 19 Jul 2012 10:49:57 +0000 (20:49 +1000)
MD RAID10:  Fix compiler warning.

Initialize variable to prevent compiler warning.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c

index 5d33603a497d6b7a0ee53c54d51501b99c4ee2ac..519e2554995c8b7c258168a6e2b9ce953bc24d0e 100644 (file)
@@ -717,7 +717,7 @@ static struct md_rdev *read_balance(struct r10conf *conf,
        int sectors = r10_bio->sectors;
        int best_good_sectors;
        sector_t new_distance, best_dist;
-       struct md_rdev *rdev, *best_rdev;
+       struct md_rdev *best_rdev, *rdev = NULL;
        int do_balance;
        int best_slot;
        struct geom *geo = &conf->geo;