MD RAID10: Fix compiler warning.
authorJonathan Brassow <jbrassow@redhat.com>
Tue, 31 Jul 2012 00:03:52 +0000 (10:03 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 31 Jul 2012 00:03:52 +0000 (10:03 +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 8da6282254c3e822a27702c469b9afce720bda43..b3d79db35e9b143e0bea303592830c0a4240d752 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;