[U-Boot] [PATCH] cmd_mmc: fix arg parsing for setdsr subcmd

Stefano Babic sbabic at denx.de
Wed Apr 12 16:48:30 UTC 2017


On 03/02/2017 15:26, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel at tq-group.com>
> 
> 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 at tq-group.com>
> Signed-off-by: Markus Niebel <Markus.Niebel at tq-group.com>
> ---
>  cmd/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/mmc.c b/cmd/mmc.c
> index b8dcc26..f83032e 100644
> --- 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) {
> 

Patch was in a limbo for a very long time - it is assigned to me, and I
have merged now to u-boot-imx.

Thanks,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list