From patchwork Fri Feb 3 14:26:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Niebel X-Patchwork-Id: 723693 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vFK1k5PGjz9s79 for ; Sat, 4 Feb 2017 01:26:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDCBFA76DD; Fri, 3 Feb 2017 15:26:47 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qXhVWKs02fLC; Fri, 3 Feb 2017 15:26:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 258254ABEE; Fri, 3 Feb 2017 15:26:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 49BC54ABEE for ; Fri, 3 Feb 2017 15:26:45 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lVB4n17AZ8kG for ; Fri, 3 Feb 2017 15:26:45 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.31.28]) by theia.denx.de (Postfix) with ESMTPS id 0C2D24ABD8 for ; Fri, 3 Feb 2017 15:26:42 +0100 (CET) Received: from [82.210.228.12] (helo=mailtqsc.tqsc.de) by smtprelay01.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1cZeoz-0005s8-R9 for u-boot@lists.denx.de; Fri, 03 Feb 2017 15:26:41 +0100 Received: from niebel-ws.tq-net.de ([10.20.228.2]) by mailtqsc.tqsc.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1cZeoy-0007pJ-QX; Fri, 03 Feb 2017 15:26:40 +0100 From: Markus Niebel To: u-boot@lists.denx.de Date: Fri, 3 Feb 2017 15:26:36 +0100 Message-Id: <1486131996-24716-1-git-send-email-niebelm@tqsc.de> X-Mailer: git-send-email 1.9.1 X-Df-Sender: MTQ1NzgzNQ== Cc: Markus Niebel Subject: [U-Boot] [PATCH] cmd_mmc: fix arg parsing for setdsr subcmd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Markus Niebel 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 Signed-off-by: Markus Niebel --- 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) {