Skip to content
Commit 962ad59e authored by Mike Frysinger's avatar Mike Frysinger Committed by Scott Wood
Browse files

env_nand: return error when no device is found



Currently, if there is an error probing the NAND chip and the env is based
in NAND, the readenv() function will use a NULL function pointer and thus
jump to address 0.

Here I just check for a non-zero value of blocksize as that shouldn't be
zero when a valid device is found, but perhaps there is a better way for
someone familiar with the NAND internals to suggest.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Tested-by: default avatarBen Gardiner <bengardiner@nanometrics.ca>
parent 668a6b45
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment