From patchwork Tue Jun 7 12:03:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69496 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1938855qgf; Tue, 7 Jun 2016 05:03:08 -0700 (PDT) X-Received: by 10.28.0.84 with SMTP id 81mr2441544wma.23.1465300988483; Tue, 07 Jun 2016 05:03:08 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 15si32984424wjz.11.2016.06.07.05.03.00; Tue, 07 Jun 2016 05:03:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3BCFA4B9AD; Tue, 7 Jun 2016 14:02:59 +0200 (CEST) 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 Gj03bvC104Un; Tue, 7 Jun 2016 14:02:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A98D34B94B; Tue, 7 Jun 2016 14:02:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 176DA4B9AD for ; Tue, 7 Jun 2016 14:02:55 +0200 (CEST) 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 YcwodqthhZmY for ; Tue, 7 Jun 2016 14:02:54 +0200 (CEST) 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 conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id 5326F4B98A for ; Tue, 7 Jun 2016 14:02:50 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id u57C2bdL019177; Tue, 7 Jun 2016 21:02:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u57C2bdL019177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465300959; bh=3wYevcUcxjDETJdveNwpevKfKFmvJa93CQixUio8Q7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wJ4WZN5TaT5AMTmahkzV4TnT9L3k+AQcENylfxnlm+Kjc8Sx+24wXXJr2du1xWof6 Tip52iDnMvSaOSMqMeDdxy/i1AA2XrQBCIS05Hd58NsjLYHDMIDgRnvBYRHQogQY1q 5yoAYmDAexeGGee8Rq2rPfnK0RPFL27vVzXRh4gQKaoiY/d0iP6erMYacb63AwTfO9 LhitF9EVR8w6WCsdU47RYnAnBsqXhe6Pa5UkM/SbwXY8+pCe8T/iFMJDUzffooFGyE YW9i/qkdlnsjupdrqt4p98rxAuLn1qlypP512fG6WNrOj1d+6xFj0LP39iymjbXGvW 2CfR1Wdh+dx+w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 7 Jun 2016 21:03:43 +0900 Message-Id: <1465301027-1650-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465301027-1650-1-git-send-email-yamada.masahiro@socionext.com> References: <1465301027-1650-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 1/5] ARM: uniphier: check return code of setenv() 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" Because setenv() may fail, it is better to check its return code. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_late_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 845f047..d9eeacb 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -56,9 +56,7 @@ static int uniphier_set_fdt_file(void) strncat(dtb_name, ".dtb", buf_len); - setenv("fdt_file", dtb_name); - - return 0; + return setenv("fdt_file", dtb_name); } int board_late_init(void)