From nobody Wed Dec 17 18:00:04 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 573521C5CD8 for ; Mon, 9 Dec 2024 13:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749686; cv=none; b=Qizm0eB75tFz59f98SYfxMy/jTg7kXrmnzcjoEYwaOBWUje4GGccZMZyyoKyCqzwCYMZiJhZD/U28+2ZAOwBxlG/avfr9WSuD7zNLl0dqGOvQLQnTnQiT2LZJZxdgBB/Ou99W/tbr9SMzxSSmazxPeHZ9H49IizFsxyrESjOvTQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749686; c=relaxed/simple; bh=P4TjaIKGSZHezFy00zzFiYLSOnURtxLh21+nrJq0HhU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rJJPO5Rc7JNruzF9UxKcnPCrVQuQ/ekGhwVgRuk2JZkxcvkpwL+d0gDyDmwD++9cCq5mN/S0pyGN/+IS70NU1XnMuD+wI2uKL43ChvTTtcDHDPm2Z92QJ17nyp03d+6BdRiuGJYECQ9ss5szETBCLOqgI3bx2ZkHazNfgomdit8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tKdUT-0004RF-Ou; Mon, 09 Dec 2024 14:07:57 +0100 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tKdUN-002W7O-1s; Mon, 09 Dec 2024 14:07:52 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tKdUO-002wxk-0n; Mon, 09 Dec 2024 14:07:52 +0100 From: Oleksij Rempel To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Woojung Huh , Andrew Lunn Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Phil Elwell Subject: [PATCH net-next v1 06/11] net: usb: lan78xx: Fix return value handling in lan78xx_set_features Date: Mon, 9 Dec 2024 14:07:46 +0100 Message-Id: <20241209130751.703182-7-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241209130751.703182-1-o.rempel@pengutronix.de> References: <20241209130751.703182-1-o.rempel@pengutronix.de> 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-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Update `lan78xx_set_features` to correctly return the result of `lan78xx_write_reg`. This ensures that errors during register writes are propagated to the caller. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn --- drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index b6e6c090a072..2966f7e63617 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -2837,9 +2837,7 @@ static int lan78xx_set_features(struct net_device *ne= tdev, =20 spin_unlock_irqrestore(&pdata->rfe_ctl_lock, flags); =20 - lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl); - - return 0; + return lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl); } =20 static void lan78xx_deferred_vlan_write(struct work_struct *param) --=20 2.39.5