]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd_mmc: fix arg parsing for setdsr subcmd
authorMarkus Niebel <Markus.Niebel@tq-group.com>
Fri, 3 Feb 2017 14:26:36 +0000 (15:26 +0100)
committerStefano Babic <sbabic@denx.de>
Wed, 12 Apr 2017 16:46:38 +0000 (18:46 +0200)
The handler do_setdsr receives only the dsr parameter,
the action is parsed before.

Error was introduced when restructuring the mmc command
implementation in commit 1fd93c6e7d8a1e4d6261058cefab11b875ded252.

Reported-by: Michael Krummsdorf <Michael.Krummsdorf@tq-group.com>
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
cmd/mmc.c

index b8dcc26eef05f6f0ccec54e2bab34e6939adbacd..f83032ec4572b8c31f839945421772e46a5fbb9e 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -710,7 +710,7 @@ static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
 
        if (argc != 2)
                return CMD_RET_USAGE;
-       val = simple_strtoul(argv[2], NULL, 16);
+       val = simple_strtoul(argv[1], NULL, 16);
 
        mmc = find_mmc_device(curr_device);
        if (!mmc) {