]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: mmc: Return symbolic value when part switching fails in mmc dev
authorYao Zi <me@ziyao.cc>
Fri, 30 Jan 2026 18:03:53 +0000 (18:03 +0000)
committerPeng Fan <peng.fan@nxp.com>
Tue, 3 Feb 2026 14:11:46 +0000 (22:11 +0800)
Return symbolic value CMD_RET_FAILURE instead of literal "1" when
failing to switch the partition to improve readability.

Signed-off-by: Yao Zi <me@ziyao.cc>
Tested-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
cmd/mmc.c

index 512bd482ae829dd1e93d0da469dd9f14f7080b3e..bcbe963f8ac0a7da21a4e0900321941682f15e24 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -606,7 +606,7 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
        printf("switch to partitions #%d, %s\n",
               part, (!ret) ? "OK" : "ERROR");
        if (ret)
-               return 1;
+               return CMD_RET_FAILURE;
 
        curr_device = dev;
        if (mmc->part_config == MMCPART_NOAVAILABLE)