From nobody Wed Nov 27 04:36:57 2024 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 DA4A11EEE9; Sun, 13 Oct 2024 13:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728825437; cv=none; b=Ej0YPwbB7hjQ45iEVY250GRdA0iyTANZ56nBx86Ow1x5hE8sViI7VCtLS3qznbPAnguIEyugURfsyZy3Dw+DAqyVhKZuLSpyqzO7rlGHZJBtn9hL1CN2/8BNINrVnXN8Hpgf65FB6/PpcbGzr9Ef1OQ2wuylq/442bWGOKC5H7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728825437; c=relaxed/simple; bh=S6BMa3OG9RtXfmc7mHcEPThNpZqWISnb3ySKVPCpNAc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=D6P5R8j6fk1vDq7lBCb35mfx3Yt4Jm9sHIV9b7q+RQ+LqfRkD2LXNWHmxGZrsbckoDPRoOE+B1wym/kB1+6F5IKYFG5hCuSq5ABahNtHS1VrfTJmLlA0Kul/R1I3/Lkju5801aWA1nmpDsVMCVcB3R8c+XLVj66QjXUWoRHO/SY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98) (envelope-from ) id 1szySq-000000006nx-0rR8; Sun, 13 Oct 2024 13:16:52 +0000 Date: Sun, 13 Oct 2024 14:16:44 +0100 From: Daniel Golle To: Jon Hunter , Hans-Frieder Vogt , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Marangi , Russell King , Daniel Golle , Bartosz Golaszewski , Abhishek Chauhan , Robert Marko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2] net: phy: aquantia: fix return value check in aqr107_config_mdi() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_property_read_u32() returns -EINVAL in case the property cannot be found rather than -ENOENT. Fix the check to not abort probing in case of the property being missing, and also in case CONFIG_OF is not set which will result in -ENOSYS. Fixes: a2e1ba275eae ("net: phy: aquantia: allow forcing order of MDI pairs") Reported-by: Jon Hunter Closes: https://lore.kernel.org/all/114b4c03-5d16-42ed-945d-cf78eabea12b@nv= idia.com/ Suggested-by: Hans-Frieder Vogt Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Reviewed-by: Jon Hunter Tested-by: Jon Hunter --- drivers/net/phy/aquantia/aquantia_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aqu= antia/aquantia_main.c index 4fe757cd7dc7..7d27f080a343 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -513,7 +513,7 @@ static int aqr107_config_mdi(struct phy_device *phydev) ret =3D of_property_read_u32(np, "marvell,mdi-cfg-order", &mdi_conf); =20 /* Do nothing in case property "marvell,mdi-cfg-order" is not present */ - if (ret =3D=3D -ENOENT) + if (ret =3D=3D -EINVAL || ret =3D=3D -ENOSYS) return 0; =20 if (ret) --=20 2.47.0