drivers: ram: stm32: fix compilation issue
authorPatrice Chotard <[email protected]>
Tue, 30 May 2017 13:06:31 +0000 (15:06 +0200)
committerTom Rini <[email protected]>
Mon, 5 Jun 2017 18:13:13 +0000 (14:13 -0400)
If CONFIG_CLK flag is not set, compilation raises the
following error message:

drivers/ram/stm32_sdram.c: In function 'stm32_fmc_probe':
drivers/ram/stm32_sdram.c:154:2: error: 'ret' undeclared (first use in this function)
  ret = stm32_sdram_init(dev);

Signed-off-by: Patrice Chotard <[email protected]>
cc: Vikas Manocha <[email protected]>

drivers/ram/stm32_sdram.c

index b640519555dc2a3088bc1aca6cfe4b0cc4527de8..902de2b6c479c4ac6b807686be1d9116e4326a55 100644 (file)
@@ -132,8 +132,8 @@ static int stm32_fmc_ofdata_to_platdata(struct udevice *dev)
 
 static int stm32_fmc_probe(struct udevice *dev)
 {
-#ifdef CONFIG_CLK
        int ret;
+#ifdef CONFIG_CLK
        struct clk clk;
 
        ret = clk_get_by_index(dev, 0, &clk);