Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4015733pxb; Mon, 8 Feb 2021 06:06:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOXxkQoGaXFtrBaekAF8x19Vtj22RxSVjkPBU1EhI2Iw9KJmN9aPRv6UQCn5dW7hUYhP17 X-Received: by 2002:a17:907:724a:: with SMTP id ds10mr16471874ejc.28.1612793190665; Mon, 08 Feb 2021 06:06:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793190; cv=none; d=google.com; s=arc-20160816; b=blbDHlT5nSD4WaUW2BWZoLwiW+7IYie1ORl6mqob4uZ7PmR7b5NVwf0Akj63s72F9s abNk2O5lplpESyh04w0d+7Gqra1ZeUZWnsZf4PxsXYYtlJLW9xWwPs2kQga5lmKAj2AV H4OgxlRl/iA/68XV70wvCYXWZRXJz7htpT54LgyyWQ1reWNbHfdqplH8Qpesgahz1NNQ 4QG/9/b3SXDTv7JDQ+cAG0CYqshdlYtGLgZAiJ/bNkXo3HbVroQV+898fhqDX0s3+qVd 5ZclTNWlQ+l9n++PYGUCb/IO9UhH+pcM1bjBZf+3k7IczCAFVNDbuZS4GWE7ILOvdZ0Q cMpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eZjfEm0UNq6mFVZlI4fFhaxLR1gHNEhg1ES3LAHBtoQ=; b=Grl+EffAbw2G7P1bVLf6PonAYpS8WGmmZRMW+G5RMAnHMtsotUxk/tQk/Nty06itA7 mB4WXfV7Vm6sJ/lIYo9EDJqNMnaWEwT2ICGM7WWuUHndjgU+p/t8kWI6jcjNV7YDIaDB amzj57S6JpiwVlIQ19uwIAopg4eG3FTHUsRqaFJshRVnku7SvHTO8ymsjmT2lkUs1ORk YMZvZiCALgRr0x42vGgBaeflytyC9g8Y/WoN5eDflWpf3nUf2NFoeHlblqUmttQ5kq0S or2g81Da0j3ldPq5WwZMS9NV88ViTEGjEvniA1N+UC15ZQtxi3yr9BJVzOUDnH+267qU Hxkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si12681124ejm.620.2021.02.08.06.05.48; Mon, 08 Feb 2021 06:06:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbhBHOEi (ORCPT + 99 others); Mon, 8 Feb 2021 09:04:38 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57070 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231871AbhBHN5r (ORCPT ); Mon, 8 Feb 2021 08:57:47 -0500 From: Serge Semin To: Rob Herring , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Johan Hovold , Maxime Ripard , Joao Pinto , Lars Persson , Maxime Coquelin CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Vyacheslav Mitrofanov , , , , , Subject: [PATCH v2 10/24] net: stmmac: dwmac-sti: Cleanup STMMAC DT-config in remove cb Date: Mon, 8 Feb 2021 16:55:54 +0300 Message-ID: <20210208135609.7685-11-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The stmmac_remove_config_dt() method needs to be called on the device remove procedure otherwise for at least some of device-nodes will be left requested. Fixes: d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c index e1b63df6f96f..3454c5eff822 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c @@ -370,11 +370,14 @@ static int sti_dwmac_probe(struct platform_device *pdev) static int sti_dwmac_remove(struct platform_device *pdev) { + struct stmmac_priv *priv = netdev_priv(platform_get_drvdata(pdev)); struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev); int ret = stmmac_dvr_remove(&pdev->dev); clk_disable_unprepare(dwmac->clk); + stmmac_remove_config_dt(pdev, priv->plat); + return ret; } -- 2.29.2