From patchwork Mon Jan 27 15:58:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Brunck X-Patchwork-Id: 314419 X-Patchwork-Delegate: albert.aribaud@free.fr 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 F10462C00A2 for ; Tue, 28 Jan 2014 03:00:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C7C04B4C1; Mon, 27 Jan 2014 17:00:07 +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 f2K0-Dzq1vXX; Mon, 27 Jan 2014 17:00:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 282594B38D; Mon, 27 Jan 2014 16:59:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 034034B397 for ; Mon, 27 Jan 2014 16:59:35 +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 0FPEmbNK9Ggy for ; Mon, 27 Jan 2014 16:59:35 +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-de.keymile.com (mail-de.keymile.com [195.8.104.250]) by theia.denx.de (Postfix) with ESMTPS id 44A324B39A for ; Mon, 27 Jan 2014 16:59:06 +0100 (CET) Received: from [10.9.1.54] (port=46554 helo=mailrelay.de.keymile.net) by mail-de.keymile.com with esmtp (Exim 4.76) (envelope-from ) id 1W7oaW-0002vU-0E; Mon, 27 Jan 2014 16:59:04 +0100 Received: from ch10641.keymile.net (ch10641.keymile.net [172.31.40.7]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id s0RFwpOn014899; Mon, 27 Jan 2014 16:59:03 +0100 (MET) From: Holger Brunck To: u-boot@lists.denx.de Date: Mon, 27 Jan 2014 16:58:26 +0100 Message-Id: <1390838309-11672-5-git-send-email-holger.brunck@keymile.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1390838309-11672-1-git-send-email-holger.brunck@keymile.com> References: <1390838309-11672-1-git-send-email-holger.brunck@keymile.com> Cc: Holger Brunck Subject: [U-Boot] [PATCH 5/8] arm/km: fix wrong error handling 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 miiphy_read and miiphy_write are returning 0 on success. Signed-off-by: Holger Brunck --- board/keymile/km_arm/km_arm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index c104896..5f32e70 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -318,15 +318,15 @@ void reset_phy(void) return; /* RGMII clk transition on data stable */ - if (!miiphy_read(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, ®)) + if (miiphy_read(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, ®)) printf("Error reading PHY spec ctrl reg\n"); - if (!miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, - reg | PHY_RGMII_CLK_STABLE | PHY_CLSA)) + if (miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, + reg | PHY_RGMII_CLK_STABLE | PHY_CLSA)) printf("Error writing PHY spec ctrl reg\n"); /* leds setup */ - if (!miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_LED_SEL_REG, - PHY_LED0_LINK | PHY_LED1_ACT | PHY_LED2_INT)) + if (miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_LED_SEL_REG, + PHY_LED0_LINK | PHY_LED1_ACT | PHY_LED2_INT)) printf("Error writing PHY LED reg\n"); /* reset the phy */