From: Heiko Schocher <hs@denx.de>
Date: Fri, 15 Jan 2021 09:37:09 +0000 (+0100)
Subject: mmc: fsl_esdhc_imx.c: fix compiler warning
X-Git-Tag: v2025.01-rc5-pxa1908~2044^2~9
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=50125bd5e62712c40d4338ce209a103703fdced5;p=u-boot.git

mmc: fsl_esdhc_imx.c: fix compiler warning

prevent unsued variable compiler warning if
DM_REGULATOR is not set.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index f47a095c50..8ac859797f 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -790,7 +790,9 @@ static int esdhc_set_voltage(struct mmc *mmc)
 {
 	struct fsl_esdhc_priv *priv = dev_get_priv(mmc->dev);
 	struct fsl_esdhc *regs = priv->esdhc_regs;
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	int ret;
+#endif
 
 	priv->signal_voltage = mmc->signal_voltage;
 	switch (mmc->signal_voltage) {