Message ID | 1611055608-6385-3-git-send-email-claudiu.beznea@microchip.com |
---|---|
State | Accepted |
Commit | 96449581b3d57e3f1561cec82920a951664398b1 |
Delegated to: | Eugen Hristev |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=gExOiARZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DKmbY71sfz9s24 for <incoming@patchwork.ozlabs.org>; Tue, 19 Jan 2021 22:27:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E202282909; Tue, 19 Jan 2021 12:27:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="gExOiARZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CDD25828FF; Tue, 19 Jan 2021 12:27:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C1275828F1 for <u-boot@lists.denx.de>; Tue, 19 Jan 2021 12:27:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Claudiu.Beznea@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1611055623; x=1642591623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Bel7/+E+FpCiTwsmIRXLc+eTw8KtExPuqMm61ftvAk8=; b=gExOiARZn1BSL/HLyqZ5QPaEuLXgH8y6Ftv6g1dOgH5fI606TlXr2reL cVeh/6HWoNvfb7YviT2l/S5qNUfHqU8GxfOgBWEWqGC/VD9EhBHUocY8a czXpzw1sDhPlK5nF+MMxeuBLiZ4j3NC/vMqSjsGNQuOIL6PJhcOOtdtKm fxlkI6MvWlIqUsp4PCImyvGcFfw4oIyJNFVqe6rjWGVUOn6tFPIy4EWji ReNGTbaVDZV9tzy6LbsFKfLewPyUCdf2KNF8ulDjK/fckHS1ctw637xI9 b4L541aocesglFW5EMy/Fe/sSaklkn5tAGNM1zMefN8KiuXWKt5RlSQvb g==; IronPort-SDR: gqHZ3KbnnbdFdPn6qwVlaTk07oWOTuvNbaYBpevI47V5rzIJRVSZnpWrqohHjE427zd+EMH+nP jXTd3jQWZyGSsty2ZF3E9Xa7HZ/tQ1hkqC1C5VFtu/xPr0SsPxPaaXCPVsHZiG0fvFSjBQuQB9 p0ntrT9611p/tK68UZWRmRoeilthfs7iGsWiYdGVhcBMOu8jyNOIWkRtB/4u5I16GeLtG77mn+ bIywyernSpfAyo2etX5V4tkxrowk5qFDKPFgAtvIBwoOrY8TO9StTVHrMVaB+N/r0wQVeKKQUG DZ0= X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="100598576" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 19 Jan 2021 04:27:01 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 19 Jan 2021 04:27:01 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 19 Jan 2021 04:27:00 -0700 From: Claudiu Beznea <claudiu.beznea@microchip.com> To: <joe.hershberger@ni.com>, <eugen.hristev@microchip.com> CC: <u-boot@lists.denx.de>, Claudiu Beznea <claudiu.beznea@microchip.com> Subject: [PATCH v3 2/5] net: macb: check clk_set_rate return value to be negative Date: Tue, 19 Jan 2021 13:26:45 +0200 Message-ID: <1611055608-6385-3-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611055608-6385-1-git-send-email-claudiu.beznea@microchip.com> References: <1611055608-6385-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
add support for sama7g5 ethernet interfaces
|
expand
|
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 097d57871093..80ed58d4b908 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -631,7 +631,7 @@ int __weak macb_linkspd_cb(struct udevice *dev, unsigned int speed) if (tx_clk.dev) { ret = clk_set_rate(&tx_clk, rate); - if (ret) + if (ret < 0) return ret; } #endif
clk_set_rate() returns the set rate in case of success and a negative number in case of failure. Consider failure only the negative numbers. Fixes: 3ef64444de157 ("dm: net: macb: Implement link speed change callback") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)