]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ddr: altera: Repair uninited variable
authorMarek Vasut <marex@denx.de>
Mon, 10 Aug 2015 21:01:43 +0000 (23:01 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:30:34 +0000 (10:30 +0200)
Fix the following problem:
drivers/ddr/altera/sequencer.c: In function 'sdram_calibration_full':
drivers/ddr/altera/sequencer.c:1943:25: warning: 'found_failing_read' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (found_passing_read && found_failing_read)
                         ^
drivers/ddr/altera/sequencer.c:1803:26: note: 'found_failing_read' was declared here
  u32 found_passing_read, found_failing_read, initial_failing_dtap;
                          ^

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/ddr/altera/sequencer.c

index f3621cf5de44306d1e48cadc936303ee6bc5950d..79c265faa21a30d8a17292da93851b87300f0b5d 100644 (file)
@@ -1800,7 +1800,7 @@ static int rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase(const u32 grp)
        u32 d, p, i;
        u32 dtaps_per_ptap;
        u32 work_bgn, work_end;
-       u32 found_passing_read, found_failing_read, initial_failing_dtap;
+       u32 found_passing_read, found_failing_read = 0, initial_failing_dtap;
        int ret;
 
        debug("%s:%d %u\n", __func__, __LINE__, grp);