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 204062F28 for ; Thu, 3 Feb 2022 20:35:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DBF3C36AE2; Thu, 3 Feb 2022 20:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643920544; bh=oOQiocX8iG93SVM0rrMHhdY+iPpvsf6Slo6TpR7wMsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kKitEMQlPbiiY1wExG3vmS9qsbk+j83xcxRJywaIT1j3CKskH+dO26zGXA5VypDYe hySUogpsO08qWO8ofVIU3hmkbD8K/mlgn9uBpNhLY7qlKRY0Yhyxa2664QHbJMmVur 70HQOg8B3tNa/r5Rs2FP7kVFxtJtFe4ju+B3jAnCq8oS3YxtUzxvBiLZy2jNCaTE7j 57itRk7liiuhOM+FavdpPlpnq792xDpkUnRghi3MoQgxdTgX3JafOjOjqTYHC8Sqfl F5sX/o7G/f4DqO8Sr5Rfl5FvOYowErBCGCsz4bjhyhbPaTdYKv5E04d4ZgiAwspb5b ns8Yrbkl5yfEw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jisheng Zhang , Jernej Skrabec , "David S . Miller" , Sasha Levin , peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, kuba@kernel.org, mcoquelin.stm32@gmail.com, mripard@kernel.org, wens@csie.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH AUTOSEL 5.10 25/25] net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout() Date: Thu, 3 Feb 2022 15:34:46 -0500 Message-Id: <20220203203447.3570-25-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220203203447.3570-1-sashal@kernel.org> References: <20220203203447.3570-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jisheng Zhang [ Upstream commit 9e0db41e7a0b6f1271cbcfb16dbf5b8641b4e440 ] When readl_poll_timeout() timeout, we'd better directly use its return value. Before this patch: [ 2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14 After this patch: [ 2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110 Signed-off-by: Jisheng Zhang Acked-by: Jernej Skrabec Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 9f5ccf1a0a540..cad6588840d8b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -734,7 +734,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv) if (err) { dev_err(priv->device, "EMAC reset timeout\n"); - return -EFAULT; + return err; } return 0; } -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1000DC433F5 for ; Thu, 3 Feb 2022 20:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bgLrICl30p7xr4rBuOu5XfVcRkTdqKrOI5FXMTVfJTs=; b=vMkq+eQsVV7odu 7Q1UaWuT/IIPTc+ZP2+W32TGPFWXQmGLSCeywB0WpPBqFz57M/w2y5nMtMH6heGahRozcp7uSYltK 6qlojjmrx1fm8Ii6WfURQDIWeAOAHPjIii0Oc/XKuOZzKVcn05EKgV7KtVcOag118PdX28Sga+mfe GUJsKCCZ0yGpq9GRcVHNocEJrmSzSp8EvYrRlDz0cY5JM3aFxo9/CEbpNHAt2mOfzqkbx4VkcA9GL nRPtrcB34wNyO/Tq5cLMIVfuHId5Ymo7n3U5ne5LprPUEwJwMMOfUBgQnQlTNbPokLUwi6PdJP8XH 2Frrs+McnzSFdaFDNUlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFito-002o5O-Ms; Thu, 03 Feb 2022 20:40:14 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFipV-002lqF-VO for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 20:35:48 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58C4361A02; Thu, 3 Feb 2022 20:35:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DBF3C36AE2; Thu, 3 Feb 2022 20:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643920544; bh=oOQiocX8iG93SVM0rrMHhdY+iPpvsf6Slo6TpR7wMsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kKitEMQlPbiiY1wExG3vmS9qsbk+j83xcxRJywaIT1j3CKskH+dO26zGXA5VypDYe hySUogpsO08qWO8ofVIU3hmkbD8K/mlgn9uBpNhLY7qlKRY0Yhyxa2664QHbJMmVur 70HQOg8B3tNa/r5Rs2FP7kVFxtJtFe4ju+B3jAnCq8oS3YxtUzxvBiLZy2jNCaTE7j 57itRk7liiuhOM+FavdpPlpnq792xDpkUnRghi3MoQgxdTgX3JafOjOjqTYHC8Sqfl F5sX/o7G/f4DqO8Sr5Rfl5FvOYowErBCGCsz4bjhyhbPaTdYKv5E04d4ZgiAwspb5b ns8Yrbkl5yfEw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jisheng Zhang , Jernej Skrabec , "David S . Miller" , Sasha Levin , peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, kuba@kernel.org, mcoquelin.stm32@gmail.com, mripard@kernel.org, wens@csie.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH AUTOSEL 5.10 25/25] net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout() Date: Thu, 3 Feb 2022 15:34:46 -0500 Message-Id: <20220203203447.3570-25-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220203203447.3570-1-sashal@kernel.org> References: <20220203203447.3570-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_123546_092451_D53E6757 X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jisheng Zhang [ Upstream commit 9e0db41e7a0b6f1271cbcfb16dbf5b8641b4e440 ] When readl_poll_timeout() timeout, we'd better directly use its return value. Before this patch: [ 2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14 After this patch: [ 2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110 Signed-off-by: Jisheng Zhang Acked-by: Jernej Skrabec Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 9f5ccf1a0a540..cad6588840d8b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -734,7 +734,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv) if (err) { dev_err(priv->device, "EMAC reset timeout\n"); - return -EFAULT; + return err; } return 0; } -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel