From nobody Sun Feb 8 07:07:40 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5372437E318; Wed, 14 Jan 2026 08:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768377790; cv=none; b=nq5qKq4WQZIhWZEE3LTMojan8GXNvqqD/OMTlOsHbzX1dVKzxplmtflKjuq4o5R+IKK8N7nHlHI2aPgbnplPFP0OnD/7tYdV3BiKUXZpqNgDSql2uwQdHFxYVAfebbNFmqJDjoGxzOwpKXRGPSGmxNEVVYO9M3CbFKOtvXCpq/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768377790; c=relaxed/simple; bh=3Cy75C8SwBJveuLRIllyUR4JqbxG2bTS5ghjcJHUvV8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jBN0r7lHrVXc3BQKjdYLA/nkTv4zNMmsj9OnHbXLKrblpsvypJnM6L38O+hCDaQFa+Z4jNvLwVk9hmM/9A+gJ1SU3hpYZCMtNHAH2pU3O+NwPN/brh2vAAQj8x7Ant1qcGr2zaa64snxCyhlH7PdGYhAjT2rnU/Fr4tZ15TuMZQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=FJq06CMr; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="FJq06CMr" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id DAB164E420CD; Wed, 14 Jan 2026 08:03:04 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id AC76E6074A; Wed, 14 Jan 2026 08:03:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B92AC103C82AE; Wed, 14 Jan 2026 09:02:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768377783; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=wccHyx90+77q+HvZP634VNgb7Z8yQVCGjbolkwO42fU=; b=FJq06CMrGUsDp0A7dlUoJU+xfMq5DxDxyEC6GTwjQmZzHw3askRRyKuu1uzafbDGFiC2JC rCnVtNMkayGQPuLM2ccJOsElIwo1a4A/HoXR60cJjMvd1sFYM01l9lTnRQDla6Bp4kPMTN f/9YhGRCIB0PjRjOMvr4c8X1qTR6E7DIpJmQGipvjmtR5FRbmG0ZuWbRtjdDLjQ8+J4tGJ tEdWoTq8MjhyRKNF3PsFvZG/Zq42qwyW3AVmPxRnmktiNIod/j4Id5Pw3t7sS3KII/f/6n FKaNMORzYf6o673G1wWB5+zeehxBs9l67sSNcACddVYTdP6GTd6AK2RlXYBd0Q== From: Maxime Chevallier To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pei Xiao , Christophe Leroy , Russell King Cc: Maxime Chevallier , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Dan Carpenter , kernel test robot Subject: [PATCH net v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found Date: Wed, 14 Jan 2026 09:02:46 +0100 Message-ID: <20260114080247.366252-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" In ucc_geth's .mac_config(), we configure the TBI Serdes block represented = by a struct phy_device that we get from firmware. While porting to phylink, a check was missed to make sure we don't try to access the TBI PHY if we can't get it. Let's add it and return early in case of error Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202601130843.rFGNXA5a-lkp@intel.com/ Fixes: 53036aa8d031 ("net: freescale: ucc_geth: phylink conversion") Signed-off-by: Maxime Chevallier --- V2: Fix commit title, adjust a bit the commit log. No code change. drivers/net/ethernet/freescale/ucc_geth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethern= et/freescale/ucc_geth.c index affd5a6c44e7..131d1210dc4a 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -1602,8 +1602,10 @@ static void ugeth_mac_config(struct phylink_config *= config, unsigned int mode, pr_warn("TBI mode requires that the device tree specify a tbi-handle\n"= ); =20 tbiphy =3D of_phy_find_device(ug_info->tbi_node); - if (!tbiphy) + if (!tbiphy) { pr_warn("Could not get TBI device\n"); + return; + } =20 value =3D phy_read(tbiphy, ENET_TBI_MII_CR); value &=3D ~0x1000; /* Turn off autonegotiation */ --=20 2.49.0