From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 ED08035959; Mon, 23 Mar 2026 15:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774278063; cv=none; b=nNNTq7ShteRpmrL83uFRI3cni+4ZYldlExNupHS06AKktLwwz0opb1Up2ICF6v3R4teZeE1bM4rGI7qMX02sInyuoPvk/FQhh94kWw+DHIadeG1zsM51N1LOlx+WGhbaLQt2RDVRVh7bZCn2A47nG50g63jDsjM8OjIJnnu4doo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774278063; c=relaxed/simple; bh=nNS12mTq3a7z3/InwXC4IA4EsFEfbL46O99wlcUuHX0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uvokFpxuu5a7epgmxrCCeMQYqn8Da+syxTOpPPZsAMqrYIJwSDd/7kcioMSZuO97XUJOyGlPAvV+cUP5zpySHNZomB4MH1fTkJjVkTdhEITraoO/bk7EgTD5vkCmBrUZctfqO4+f/049oLJRnzwndEOKWYVapsgojvmoBXnEv34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lK9YouxD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lK9YouxD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 729CCC4CEF7; Mon, 23 Mar 2026 15:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774278062; bh=nNS12mTq3a7z3/InwXC4IA4EsFEfbL46O99wlcUuHX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lK9YouxDZi2o40IRSKu/i3VhhR98IXsMFQWVdgQRW4iZEW6X6KeFjGYb8qLC3bRIz 18X23Wyy5VJgGjGC/qtu9wY4uidNQ+/1VQ7T3lYLh0cOK1hJJ5nUgwg0omLA787yfq WBKlaJ4Clc94pnT+A7MIQsiXD1tSvB/Ylb6G9zjI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mieczyslaw Nalewaj , Andrew Lunn , Luiz Angelo Daros de Luca , Linus Walleij , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 147/567] net: dsa: realtek: rtl8365mb: fix rtl8365mb_phy_ocp_write return value Date: Mon, 23 Mar 2026 14:41:07 +0100 Message-ID: <20260323134537.468439630@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134533.749096647@linuxfoundation.org> References: <20260323134533.749096647@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mieczyslaw Nalewaj [ Upstream commit 7cbe98f7bef965241a5908d50d557008cf998aee ] Function rtl8365mb_phy_ocp_write() always returns 0, even when an error occurs during register access. This patch fixes the return value to propagate the actual error code from regmap operations. Link: https://lore.kernel.org/netdev/a2dfde3c-d46f-434b-9d16-1e251e449068@yahoo.com/ Fixes: 2796728460b8 ("net: dsa: realtek: rtl8365mb: serialize indirect PHY register access") Signed-off-by: Mieczyslaw Nalewaj Reviewed-by: Andrew Lunn Signed-off-by: Luiz Angelo Daros de Luca Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20260301-realtek_namiltd_fix1-v1-1-43a6bb707f9c@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/dsa/realtek/rtl8365mb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 41ea3b5a42b14..318eced8f0d34 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -766,7 +766,7 @@ static int rtl8365mb_phy_ocp_write(struct realtek_priv *priv, int phy, out: mutex_unlock(&priv->map_lock); - return 0; + return ret; } static int rtl8365mb_phy_read(struct realtek_priv *priv, int phy, int regnum) -- 2.51.0