]> git.baikalelectronics.ru Git - uboot.git/commit
env: Correct case of no sub-init function
authorTom Rini <trini@konsulko.com>
Sun, 20 Aug 2017 02:27:57 +0000 (22:27 -0400)
committerTom Rini <trini@konsulko.com>
Sun, 20 Aug 2017 23:27:28 +0000 (19:27 -0400)
commit17a4edd3aa7da2b169c26143888df47eb74024e2
treeec04faf5e627094cb02d4ad9afd7286f4c7798e8
parent46173c126ac15de3e6dad2579972ace34baec0b5
env: Correct case of no sub-init function

With the change to the environment code to remove the common init stage
of pointing to the default environment and setting it as valid, combined
with the change to switch gd->env_valid from 0/1/2 to an enum we now
must set env_valid to one of the enum values rather than an int.  And in
this case, not only was setting it to an int wrong, it was now the wrong
value.  Finally, in the case of ENV_IS_NOWHERE we must still say that
our envionrment is invalid after init for things to continue to
function.

Fixes: 4070183f575e ("env: Drop common init() functions")
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Reported-by: Marek Vasut <marek.vasut@gmail.com>
Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v3:
- Actually include changes for env/nowhere.c
env/env.c
env/nowhere.c