Skip to content
Commit e6b7afe7 authored by Patrice Chotard's avatar Patrice Chotard
Browse files

mtd: Fix get_mtdparts()



When ENV_IS_IN_UBI is enable, get_mtdparts is called before relocation.

During first get_mtdparts() call, mtdparts is not available in environment,
it can be retrieved by calling board_mtdparts_default(), but following
env_set() do nothing as we are before relocation. Finally mtdparts is
still not available in environment.

At second get_mtdparts() call, use_defaults is false, but mtdparts is still
not in environment and is NULL.

Remove use_defaults bool, only mtdparts criteria is useful.

Fixes: commit 5ffcd506 ("mtd: Use default mtdparts/mtids when not defined
in the environment")

Signed-off-by: default avatarPatrice Chotard <patrice.chotard@st.com>
parent 8f24b1a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment