From patchwork Thu Nov 25 07:05:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Weber X-Patchwork-Id: 72992 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 A985BB70AA for ; Thu, 25 Nov 2010 18:07:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B2AC428157; Thu, 25 Nov 2010 08:06:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 Ys-vN70WAyHV; Thu, 25 Nov 2010 08:06:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 904A928158; Thu, 25 Nov 2010 08:06:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E4112813C for ; Thu, 25 Nov 2010 08:06:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 jgQ16k5xzslB for ; Thu, 25 Nov 2010 08:06:17 +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 moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by theia.denx.de (Postfix) with ESMTP id 0539128138 for ; Thu, 25 Nov 2010 08:06:13 +0100 (CET) Received: from corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net [212.114.252.242]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LvzHJ-1ONXvV1O2f-017WN2; Thu, 25 Nov 2010 08:06:13 +0100 Received: from Lupus.CS.local (unknown [192.168.102.87]) by corscience.de (Postfix) with ESMTP id D4D1A520A1; Thu, 25 Nov 2010 08:06:08 +0100 (CET) From: Thomas Weber To: u-boot@lists.denx.de Date: Thu, 25 Nov 2010 08:05:29 +0100 Message-Id: <1290668730-26595-3-git-send-email-weber@corscience.de> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290668730-26595-1-git-send-email-weber@corscience.de> References: <1290668730-26595-1-git-send-email-weber@corscience.de> X-Provags-ID: V02:K0:s9pjKGR8AcT2KTLn0cLM/uIFzlxI3MD6mNqqVxL9JJV 3tV2Z+bmdzhbW/y+Bc7pf+cKW33/9MVw+yO2tMerwdCO4gZzEH vUNroHNWzJn6T37hulLH7es6S6qRnG+14zKiyPDOlJi99jwn7R fh2PsiT0QBINusN+zyw+Wa1EVoQRzdItM+vJIBMCc16SaSAiDG ez/agSGpNUmQH9P/2Pu8Q== Cc: Thomas Weber Subject: [U-Boot] [PATCHv2 2/3] gdsys: osd: Use return value of cmd_usage X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Use the return value of cmd_usage instead of ignoring this and returning a 1. Signed-off-by: Thomas Weber --- board/gdsys/common/osd.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index 05800ff..239c870 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -142,8 +142,7 @@ static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *text; if (argc < 5) { - cmd_usage(cmdtp); - return 1; + return cmd_usage(cmdtp); } x = simple_strtoul(argv[1], NULL, 16); @@ -204,8 +203,7 @@ int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) unsigned count = (argc > 4) ? simple_strtoul(argv[4], NULL, 16) : 1; if ((argc < 4) || (strlen(argv[3]) % 4)) { - cmd_usage(cmdtp); - return 1; + return cmd_usage(cmdtp); } x = simple_strtoul(argv[1], NULL, 16);