cbfs: Change file_cbfs_find_uncached() to return an error
authorSimon Glass <sjg@chromium.org>
Sun, 24 May 2020 23:38:22 +0000 (17:38 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 27 May 2020 06:40:09 +0000 (14:40 +0800)
commit924e346a66ea57f48d6f8467c30d411442229946
treeee443db70ff469b7c94b01e2f8464fe340e99c63
parent0e7b6312e7c6780381612fe09a73c77f77e63c2d
cbfs: Change file_cbfs_find_uncached() to return an error

This function currently returns a node pointer so there is no way to know
the error code. Also it uses data in BSS which seems unnecessary since the
caller might prefer to use a local variable.

Update the function and split its body out into a separate function so we
can use it later.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
fs/cbfs/cbfs.c
include/cbfs.h