SYS_MMC_ENV_PART is an integer option. If it is set to 2 to use the
second hardware boot partition, the IS_ENABLED check fails as it expects
a boolean, and then it does not get the correct hwpart.

Signed-off-by: Javier Viguera <javier.vigu...@digi.com>
---
 env/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/env/mmc.c b/env/mmc.c
index cb14bbb58f13..df82969d4231 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -111,7 +111,7 @@ static inline s64 mmc_offset(struct mmc *mmc, int copy)
        int hwpart = 0;
        int err;
 
-       if (IS_ENABLED(CONFIG_SYS_MMC_ENV_PART))
+       if (CONFIG_VAL(SYS_MMC_ENV_PART))
                hwpart = mmc_get_env_part(mmc);
 
 #if defined(CONFIG_ENV_MMC_PARTITION)

Reply via email to