diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-25 23:11:06 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-05-05 15:06:02 -0400 |
commit | 274347030631141f3e6259b2ec4fcd11365dd9a3 (patch) | |
tree | e71b353c44a8ab63825c0535cbf22d57c128920f | |
parent | 6d81319728c6a20b3e6d3dc828cb351fb5dcb1c6 (diff) | |
download | u-boot-274347030631141f3e6259b2ec4fcd11365dd9a3.zip u-boot-274347030631141f3e6259b2ec4fcd11365dd9a3.tar.gz u-boot-274347030631141f3e6259b2ec4fcd11365dd9a3.tar.bz2 |
cmd: mmc: don't assign unused values
Don't assign a value to variable speedmode which is never used.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r-- | cmd/mmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -501,11 +501,12 @@ static int do_mmc_rescan(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct mmc *mmc; - enum bus_mode speed_mode = MMC_MODES_END; if (argc == 1) { mmc = init_mmc_device(curr_device, true); } else if (argc == 2) { + enum bus_mode speed_mode; + speed_mode = (int)dectoul(argv[1], NULL); mmc = __init_mmc_device(curr_device, true, speed_mode); } else { @@ -543,7 +544,6 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag, { int dev, part = 0, ret; struct mmc *mmc; - enum bus_mode speed_mode = MMC_MODES_END; if (argc == 1) { dev = curr_device; @@ -561,6 +561,8 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag, } mmc = init_mmc_device(dev, true); } else if (argc == 4) { + enum bus_mode speed_mode; + dev = (int)dectoul(argv[1], NULL); part = (int)dectoul(argv[2], NULL); if (part > PART_ACCESS_MASK) { |