From patchwork Sun Apr 2 14:30:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13197409 X-Patchwork-Delegate: kuba@kernel.org 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 5FBA7C761AF for ; Sun, 2 Apr 2023 14:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjDBObM (ORCPT ); Sun, 2 Apr 2023 10:31:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjDBObG (ORCPT ); Sun, 2 Apr 2023 10:31:06 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11EEC113E2 for ; Sun, 2 Apr 2023 07:31:05 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1piyjJ-0002tZ-SE; Sun, 02 Apr 2023 16:30:49 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1piyjD-008TQR-Gw; Sun, 02 Apr 2023 16:30:43 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1piyjC-009zBO-Py; Sun, 02 Apr 2023 16:30:42 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Nobuhiro Iwamatsu Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH net-next 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void Date: Sun, 2 Apr 2023 16:30:16 +0200 Message-Id: <20230402143025.2524443-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230402143025.2524443-1-u.kleine-koenig@pengutronix.de> References: <20230402143025.2524443-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1617; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=AWlXAjZ8Ru7rdnyMS6Bp0oEoCFeAMPQ9Sd9tZwp6bt4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkKZFwESTTkfx0VtVJee/4tr8hCMjm/sabGCIxL BeZYKE/bVaJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZCmRcAAKCRCPgPtYfRL+ Tg8SB/0Uu9Y6uwYBc/ar46+3Oac+t9HCEarKVeuahv+ZzJQwVqlf3qlUMDIP7OQz5tU+A2vk2/o nQD+aTU6trAflXX9OkGP/yapNltErHD14G0gnFZzvfbyzHCeqXnWKC/sHQpms+nXNIIuglFfHzG R7IrqeQbi3NCYUMZo/2pCd9vXaOfaIJdd2G5Jt/D1CqrHDloT7UZ4TdVY6J1/GtDbK6dLJ+3LbR eJKVU3ihH+TNGZEri5rHI9OVBARX0AbgnLgKiDwlXjY6TlWXwcW5q5uxsv8XNDMin5fKH22i7hf M6UIl4u+Da+pddHimVHNeGZAV53p2H8BkPihvYcRw3RdGKDV X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The function returns zero unconditionally. Change it to return void instead which simplifies one caller as error handing becomes unnecessary. Signed-off-by: Uwe Kleine-König --- drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c index d43da71eb1e1..7531fcd4ffe2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c @@ -198,7 +198,7 @@ static int visconti_eth_clock_probe(struct platform_device *pdev, return 0; } -static int visconti_eth_clock_remove(struct platform_device *pdev) +static void visconti_eth_clock_remove(struct platform_device *pdev) { struct visconti_eth *dwmac = get_stmmac_bsp_priv(&pdev->dev); struct net_device *ndev = platform_get_drvdata(pdev); @@ -206,8 +206,6 @@ static int visconti_eth_clock_remove(struct platform_device *pdev) clk_disable_unprepare(dwmac->phy_ref_clk); clk_disable_unprepare(priv->plat->stmmac_clk); - - return 0; } static int visconti_eth_dwmac_probe(struct platform_device *pdev) @@ -267,9 +265,7 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev) stmmac_pltfr_remove(pdev); - err = visconti_eth_clock_remove(pdev); - if (err < 0) - dev_err(&pdev->dev, "failed to remove clock: %d\n", err); + visconti_eth_clock_remove(pdev); stmmac_remove_config_dt(pdev, priv->plat);