From patchwork Fri Aug 2 13:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 816233 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp269753wrh; Fri, 2 Aug 2024 06:14:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXkQfx1Us4oiUrgJ403q/3gMxWbAgKN/wVLzeRs9sJ1Yahsw8A2SOKLpILTjS9O9WU4xvQWUNd4jgMCfNne9wwS X-Google-Smtp-Source: AGHT+IE4l84150hUYoCax3O85gs77T0rTcI7jsJsDXpBhqTDYXTzJtGo+TFwKyk/dzWWNfn7aVJo X-Received: by 2002:a17:906:cae5:b0:a77:ce4c:8c9c with SMTP id a640c23a62f3a-a7dbcbd4ecamr422406466b.8.1722604494002; Fri, 02 Aug 2024 06:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722604493; cv=none; d=google.com; s=arc-20160816; b=dnWy0KF9u5tkHMMd/UT7eAJMbuLYavqovbLmY/Cv7kscIokZG54EoeXu1l9K+3K0h0 3kZfSHPvWRKscyiB5nplDIERF+fGPtEAoonjK0rNjo8D9WBybuCvjK38XK5zns5x5lNh 56ggaECBAedUxwQx9NeHnMS3fBZu0E7g1kT8g09VXdukf7LZJa6UWO9WrogpA59dErfo 1V3TB6S1suATF/GlTr0KsHnXFRIQAvx1ZL2wmXQUWu8+1Ddn/nQTgdtgieMUsUs7R/o/ 1GpxgJCq5VlEoM/XXSKSQQvk/aNo6Pg7nr7GaD/bSz8+L96NOWvaNRvDtC+oWCbTFv9F 7UqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pDoaqxi/pyuwz1Jij51+SeQNLYun2RqMvJ8lA1MifIY=; fh=/pPnBeACjnr4SScD5apCjdqwBo6xUTZp8Ka5MMfU8gQ=; b=0K8WvdWD4JyNmKHPXpPGjUQX8JhuAQml+e/Jq8xYYNkFMd6IzcKo2d1dk+t+TLQfZG 119OZyKWYSTTl1RPhzPWPFjBbZRoYQfeZn5hO3VfWhXmPsjopxXdVgnBndHfg+3vXKDe UOkDUNjZk2Yfa36rzKtOBwYk9nkLItiRtN0MityUuYSJMWmDPjhEa09ey55LYrV7PR69 qkDlwiw2BVQyMs2yjEQbU0r0af4VFNLiwyvqHDJ4puT6pDCqAHhMFczbIfjUNTV4aviH Y691PL/jSLIdQtnOKxkgBfXLA9I1nfu3PE3q0jMk7Bgma6bdvToCxkCTpx1V75QafMJ7 jVBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P8Psfvku; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a7dc9d68a8dsi106453266b.349.2024.08.02.06.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 06:14:53 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P8Psfvku; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 20B9188A98; Fri, 2 Aug 2024 15:14:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="P8Psfvku"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7561288BBA; Fri, 2 Aug 2024 15:14:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 697C888BC6 for ; Fri, 2 Aug 2024 15:14:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-368526b1333so1940595f8f.1 for ; Fri, 02 Aug 2024 06:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722604487; x=1723209287; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pDoaqxi/pyuwz1Jij51+SeQNLYun2RqMvJ8lA1MifIY=; b=P8Psfvkue1PglVSemZ74+vUhHdGcAxvBYfLHGAHehJJ7m/Vv/k8SX/7D2EbND0+W86 Y6F15NCbiB1EjF3eML/PFOwxdPwj8hAvoKfjMOO+2SF59vSORl/e5iV9D4BPQXoLvv98 mfAv1fZY3plgVoQQjiiIx7bVunmlmZsjL/O+ILLTHcp52BS/FnaEaQ3PXuPLvC2XS3VG G5D9JnEIjYAVUP7DQXlkuSCvTvJ1oh1r5SVQuYupOdvWJsiy29gkJ5MZqyUj7PaEgY2o fb2jdmK3mIIUIVTz84+hjEBgSTSRqMVvGGsqpR/BR0XHqE/KLYelZ5EzZ6E8IYLMtBGg YFcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722604487; x=1723209287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pDoaqxi/pyuwz1Jij51+SeQNLYun2RqMvJ8lA1MifIY=; b=DRRR63mfla5ezmnonvrTFt6pu7PKKATx//IsRJch1B96IMfFe4Jm2VgPMCEqurA253 /0O0PElsHfz3vAZU7x/AOsD+Tivo3cktzWN+XUOAHM7VOIpvRBvL5W9DDSci0nsmubts D0xqYi4Xd2W0m/nB3RMKW1zc0RcC9/p6U8/xDgiJc/DI/I65DjW5ntnxUJKokZALjrS8 THyY2Z4uROHKwQdDjADVVPfVfVs0w6uGSgSSeDATx02uTOG2JqIHUgwVmYk/mB7jtcR3 Nk8i4V79FcweKnNy7us3DJFk/nW0gy9XJovFqWYZXvOIcssoMaayfhO2OCNKSHRB084u DXVQ== X-Gm-Message-State: AOJu0YwM15G3aEtOfHpMSsIWk16ZM71ediQ0e5KgOQHC+I2TIUg/BNiT nDIqBQJFw5+I/TugFBR9Kj7PI06K/ee9mW4DFgpVklXuv0SZpuTQIwLoSoOsVsmcedAGj+S5rcv t9Kjf8DCO X-Received: by 2002:adf:f588:0:b0:360:70e3:ef2b with SMTP id ffacd0b85a97d-36bbbecb238mr2518948f8f.26.1722604486662; Fri, 02 Aug 2024 06:14:46 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:4fc9:a3ab:c134:cdf4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf0cc58sm1970304f8f.2.2024.08.02.06.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 06:14:46 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Ye Li Subject: [PATCH v6 04/20] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Fri, 2 Aug 2024 15:13:51 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier --- drivers/net/fec_mxc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 0a0d92bc2cd..2dc1364beec 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -615,8 +615,7 @@ static int fecmxc_init(struct udevice *dev) if (fec->xcv_type != SEVENWIRE) miiphy_restart_aneg(dev); #endif - fec_open(dev); - return 0; + return fec_open(dev); } /**