diff mbox

[U-Boot] drivers: ram: stm32: fix compilation issue

Message ID 1496149591-28876-1-git-send-email-patrice.chotard@st.com
State Accepted
Commit 14a50e37360231a096b4f39be8d64800aecd830c
Delegated to: Tom Rini
Headers show

Commit Message

Patrice CHOTARD May 30, 2017, 1:06 p.m. UTC
From: Patrice Chotard <patrice.chotard@st.com>

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 <patrice.chotard@st.com>
cc: Vikas Manocha <vikas.manocha@st.com>
---
 drivers/ram/stm32_sdram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini June 6, 2017, 12:23 a.m. UTC | #1
On Tue, May 30, 2017 at 03:06:31PM +0200, Patrice Chotard wrote:

> From: Patrice Chotard <patrice.chotard@st.com>
> 
> 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 <patrice.chotard@st.com>
> cc: Vikas Manocha <vikas.manocha@st.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 48b4979..af463fc 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -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);