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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 510F5C433FE for ; Mon, 14 Feb 2022 10:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344710AbiBNKFY (ORCPT ); Mon, 14 Feb 2022 05:05:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344901AbiBNKBH (ORCPT ); Mon, 14 Feb 2022 05:01:07 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A92210F5; Mon, 14 Feb 2022 01:47:21 -0800 (PST) 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 293CD61287; Mon, 14 Feb 2022 09:47:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3532C340E9; Mon, 14 Feb 2022 09:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644832040; bh=ux248V0POPKjdJUJNtyaDAVvogc5sUitZJw1c/YZlj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aG57lUw3nzxkymU7Tzp48O7GRh6ts4BTHvsu+4vsRuxHQBLppsj2uVVWHuNNWmPXG /eUf8iAIoJo6fw7E70McVlncNQQEhROm00dsZO3KODd/ria7Q/D1cdIEg/oeWNZ172 pzDj7fN1YGBLTEZ7tI4X+r0PpZvOT37JnHexa3Eg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jisheng Zhang , Jernej Skrabec , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 059/172] net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout() Date: Mon, 14 Feb 2022 10:25:17 +0100 Message-Id: <20220214092508.424771359@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092506.354292783@linuxfoundation.org> References: <20220214092506.354292783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 4422baeed3d89..13fbb68158c66 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -756,7 +756,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