mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-17 18:34:42 +00:00
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: 2f84e9cf06
("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>
This commit is contained in:
parent
bf28d9a659
commit
689525b12e
1 changed files with 1 additions and 0 deletions
|
@ -111,6 +111,7 @@ static int do_extension_apply(struct cmd_tbl *cmdtp, int flag,
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
|
|
||||||
if (strcmp(argv[1], "all") == 0) {
|
if (strcmp(argv[1], "all") == 0) {
|
||||||
|
ret = CMD_RET_FAILURE;
|
||||||
list_for_each_entry(extension, &extension_list, list) {
|
list_for_each_entry(extension, &extension_list, list) {
|
||||||
ret = extension_apply(extension);
|
ret = extension_apply(extension);
|
||||||
if (ret != CMD_RET_SUCCESS)
|
if (ret != CMD_RET_SUCCESS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue