[UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning
authorakpm@linux-foundation.org <akpm@linux-foundation.org>
Wed, 16 Jan 2008 10:48:49 +0000 (02:48 -0800)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 3 Feb 2008 07:10:00 +0000 (18:10 +1100)
drivers/mtd/ubi/scan.c: In function 'ubi_scan':
drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/ubi/scan.c

index c7b0afc9d2808e13b64ce2fae7d6755b2c99041e..c57e8eff9866b32d4d81accf94c87ce7c82136a8 100644 (file)
@@ -769,7 +769,7 @@ struct ubi_scan_leb *ubi_scan_get_free_peb(struct ubi_device *ubi,
  */
 static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, int pnum)
 {
-       long long ec;
+       long long uninitialized_var(ec);
        int err, bitflips = 0, vol_id, ec_corr = 0;
 
        dbg_bld("scan PEB %d", pnum);