diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-07-11 20:01:12 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-04 13:59:59 -0400 |
commit | 689525b12e00881b88cc8f02c9c711ae9b2f6b5a (patch) | |
tree | 6bc6b29ce7fd0684e781fe1fd0faeec425cbb8c8 | |
parent | bf28d9a65999bcf60425e65a7daf0d539838a845 (diff) | |
download | u-boot-689525b12e00881b88cc8f02c9c711ae9b2f6b5a.zip u-boot-689525b12e00881b88cc8f02c9c711ae9b2f6b5a.tar.gz u-boot-689525b12e00881b88cc8f02c9c711ae9b2f6b5a.tar.bz2 |
cmd: undefined return value of do_extension_apply()
If 'extension apply all' is executed and no extension is found, the return
value of do_extension_apply() is undefined. Return CMD_RET_FAILURE in this
case.
Fixes: 2f84e9cf06d3 ("cmd: add support for a new "extension" command")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
-rw-r--r-- | cmd/extension_board.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/extension_board.c b/cmd/extension_board.c index bbb4812..f94abd6 100644 --- a/cmd/extension_board.c +++ b/cmd/extension_board.c @@ -111,6 +111,7 @@ static int do_extension_apply(struct cmd_tbl *cmdtp, int flag, return CMD_RET_USAGE; if (strcmp(argv[1], "all") == 0) { + ret = CMD_RET_FAILURE; list_for_each_entry(extension, &extension_list, list) { ret = extension_apply(extension); if (ret != CMD_RET_SUCCESS) |