From patchwork Thu Dec 27 10:26:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 208295 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 94ACA2C00D0 for ; Thu, 27 Dec 2012 21:27:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 570304A0F0; Thu, 27 Dec 2012 11:27:13 +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 2ze2oPSSdnMl; Thu, 27 Dec 2012 11:27:12 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C1BE94A0C5; Thu, 27 Dec 2012 11:27:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1F714A0C5 for ; Thu, 27 Dec 2012 11:27:09 +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 3tW9pc9HSsRB for ; Thu, 27 Dec 2012 11:27:09 +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 mail-ye0-f174.google.com (mail-ye0-f174.google.com [209.85.213.174]) by theia.denx.de (Postfix) with ESMTPS id CDC004A0C1 for ; Thu, 27 Dec 2012 11:27:07 +0100 (CET) Received: by mail-ye0-f174.google.com with SMTP id m6so1541069yen.33 for ; Thu, 27 Dec 2012 02:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=fr6+K/jk2vVP7DgDiEgf+sG/z6pgmYYGv/mHhnfmof8=; b=squG+yesVPXY+WpjD6ohtuDl2IhU9lFHbYf3uwTkyLcUnLxKVtbesNuD+Pbb2yhg8F +oDQmpYJOu0HYkOpgGqCc+DeXXERtpo+HoI3ePPhzQcmIpp++yACwPcydkoPPmMNweTB 7MVia2MNqkuPPVNgHyOr+7TqT3UXsR22EaP7UGyeDt4kjBA7PAwBTgmB8IJJROwawwch 5pmfIPMZY92browfZZIsGNCW55GbTm372Ry6uTv8H2PL7kzGurAnF502c1OFpiv0UA+s ztS3TmG6lZUobnNeuGHIdygYDlSut2eIg5ZJG8/72QxN9rrx9327R/u9LtKORAGbGcN7 Lc3w== X-Received: by 10.236.151.168 with SMTP id b28mr26137073yhk.11.1356604026078; Thu, 27 Dec 2012 02:27:06 -0800 (PST) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([189.61.223.46]) by mx.google.com with ESMTPS id j25sm27036003yhm.13.2012.12.27.02.27.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 02:27:05 -0800 (PST) From: Fabio Estevam To: sbabic@denx.de Date: Thu, 27 Dec 2012 08:26:57 -0200 Message-Id: <1356604017-9699-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH] mx53loco: Remove unneeded 'retval' variable 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 From: Fabio Estevam commit c73368150 (pmic: Extend PMIC framework to support multiple instances of PMIC devices) introduced an extra 'retval' variable, but this is not necessary since we have already the variable 'ret' in place. So use 'ret' to store the return values from the pmic related calls and remove 'retval'. Signed-off-by: Fabio Estevam --- board/freescale/mx53loco/mx53loco.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 63a4f8b..b1bfb90 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -345,12 +345,11 @@ static int power_init(void) unsigned int val; int ret = -1; struct pmic *p; - int retval; if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) { - retval = pmic_dialog_init(I2C_PMIC); - if (retval) - return retval; + ret = pmic_dialog_init(I2C_PMIC); + if (ret) + return ret; p = pmic_get("DIALOG_PMIC"); if (!p) @@ -370,9 +369,9 @@ static int power_init(void) } if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) { - retval = pmic_init(I2C_PMIC); - if (retval) - return retval; + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; p = pmic_get("FSL_PMIC"); if (!p)