From nobody Sun Feb 8 05:37:08 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 8C3E536A02E for ; Tue, 13 Jan 2026 07:43:37 +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=1768290227; cv=none; b=UZr46t0MNyGA8QHF8tbwS9AmjXmVpc7MtoKDC7BvjWeh+c/iafw/NQ2yxaXhbqQbXcHduUN6bpcAedpqi1a2RRTycnUZj1k+CLtNmihreeLZTFqkFDsO++0tyGMNUkua7SudUM77ag64St8tzrN6CX7x2wB/atNVWn40FHl4wZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768290227; c=relaxed/simple; bh=OQDoSB2IzjLVr1l775Y7jgqqODinC4ipSFd3uBtG/0o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n08pGAdNqlSXFBC5Jthch0gvzO99vpb3LIX7oldTuwnS8m3M+pPIJAA63XYhydABqa1egVk4EdQ1BwCTwnd0tXlyFWVMVy6DrlVn9JZILwiCOtObaskR4lk2rhIuBG3smeKL9Xc8udFVtSDkY5XLoBAkp7sicvadjyZojx43rTM= 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=IhV3i2/m; 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="IhV3i2/m" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 9ABFF4E4209D; Tue, 13 Jan 2026 07:43:30 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6909B60732; Tue, 13 Jan 2026 07:43:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4EF4A103C9297; Tue, 13 Jan 2026 08:43:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768290209; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=HmfawJeph5zrc/JQ3yN5fBTmU7PzUKSvNQ03fKIgN2o=; b=IhV3i2/mfLNUHoS9K/xk7g7E069bNzozobESkhXkwuKPnhHyjy/jqwYbzx0j3daBQPjIGA 6QGC8dBTCvXj9I0G5YZT93WIzHOL3aYorIE+LXOc0iLbA7ws4ymwoCZvEFP3yDbD9IMLtC MD2HEPEof7ZIKuV9PP0YsBocy35oQPc890QxD2gueebMpFM5nOjR0siIjuIJV8pqmzBFkc qvwjx0u1+afdtnUtZqz9dNt7R0hc9X+jk3pZN+/Ib6UMSc5vvw6NtQVc1O2G7cwhL/wfUM RofTXY/40NkSj9F06BLr1wIoGGEgNWlFBzinX7nq2dadLtRQcNOzX4MJq5jnkw== 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] net: freescale: ucc_geth: Return early when TBI found can't be found Date: Tue, 13 Jan 2026 08:43:15 +0100 Message-ID: <20260113074316.145077-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 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 --- 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