소스 검색

cmd_mmc: fix arg parsing for setdsr subcmd

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>
Markus Niebel 8 년 전
부모
커밋
84c1dfe42f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cmd/mmc.c

+ 1 - 1
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) {