From patchwork Wed Oct 3 19:38:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Hershberger X-Patchwork-Id: 188911 X-Patchwork-Delegate: trini@ti.com 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 629982C0337 for ; Thu, 4 Oct 2012 06:20:34 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6653528162; Wed, 3 Oct 2012 21:39:45 +0200 (CEST) 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 wCvMNVDKCKus; Wed, 3 Oct 2012 21:39:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6058A28163; Wed, 3 Oct 2012 21:39:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF7F42815B for ; Wed, 3 Oct 2012 21:39:22 +0200 (CEST) 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 K4Zds9THFHxI for ; Wed, 3 Oct 2012 21:39:21 +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 spamkiller05.natinst.com (mailserver5.natinst.com [130.164.80.5]) by theia.denx.de (Postfix) with ESMTP id 3FD862813A for ; Wed, 3 Oct 2012 21:39:19 +0200 (CEST) Received: from mailserv58-us.natinst.com (nb-hsrp-1338.natinst.com [130.164.19.133]) by spamkiller05.natinst.com (8.14.4/8.14.4) with ESMTP id q93Jd9dv018476; Wed, 3 Oct 2012 14:39:09 -0500 Received: from linux-xvxi.natinst.com ([130.164.14.197]) by mailserv58-us.natinst.com (Lotus Domino Release 8.5.3FP2 HF169) with ESMTP id 2012100314390892-376687 ; Wed, 3 Oct 2012 14:39:08 -0500 From: Joe Hershberger To: u-boot@lists.denx.de Date: Wed, 3 Oct 2012 14:38:48 -0500 Message-Id: <1349293130-5715-4-git-send-email-joe.hershberger@ni.com> X-Mailer: git-send-email 1.7.11.5 In-Reply-To: <1349293130-5715-1-git-send-email-joe.hershberger@ni.com> References: <1345236586-19076-1-git-send-email-joe.hershberger@ni.com> <1349293130-5715-1-git-send-email-joe.hershberger@ni.com> X-MIMETrack: Itemize by SMTP Server on MailServ58-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 10/03/2012 02:39:09 PM, Serialize by Router on MailServ58-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 10/03/2012 02:39:09 PM, Serialize complete at 10/03/2012 02:39:09 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-03_02:2012-10-03, 2012-10-02, 1970-01-01 signatures=0 Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [PATCH v2 3/5] tools/env: Don't call env_init() in fw_getenv() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 We will only call fw_getenv when the env has already been initialized. Signed-off-by: Joe Hershberger --- tools/env/fw_env.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index af879f1..f883804 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -258,9 +258,6 @@ char *fw_getenv (char *name) { char *env, *nxt; - if (fw_env_open()) - return NULL; - for (env = environment.data; *env; env = nxt + 1) { char *val;