]> git.sur5r.net Git - u-boot/commit
cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init
authorLadislav Michl <ladis@linux-mips.org>
Tue, 12 Jul 2016 18:28:22 +0000 (20:28 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 22 Jul 2016 18:46:13 +0000 (14:46 -0400)
commitc0ac3339475d3b6afc0cd901f20dd21d5fade17d
tree52c2bcaa775bbc230370358ca51a235b098ebe5b
parent52486927e7f0c9ea2c5af32cc21496c908cae661
cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init

A private buffer is used to read mtdparts variable from non-relocated
environment. A pointer to that buffer is returned unconditionally,
confusing later test for variable presence in the environment.
Fix it by returning NULL when getenv_f fails.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
cmd/mtdparts.c