Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4018668pxb; Mon, 8 Feb 2021 06:09:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFF2gbwPXb/PfMxG0052GPcae1XVsv+8u/Yw83RBTK+rchjyqLTh6D5dufRK7Q5SHPaac7 X-Received: by 2002:a17:906:7d9:: with SMTP id m25mr16912356ejc.473.1612793377173; Mon, 08 Feb 2021 06:09:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793377; cv=none; d=google.com; s=arc-20160816; b=zmuTVH5zJ62rbR8S5Xvr3e68GMZMJ4fNlCYx0GAEirxvlQSHpKT0S+G83ZpGBvhMzd 9b4IBOsBnIeNLcHBcAI/l/GfQc+jKkvLCBXTBp1JbeWOqIbtGQY580WUH2KMkXm+q2kJ vzylp286U8OSHXsXEnZoLdcq38dpH8J44RKeOED7d/AXndR87kN4a9bV7kInICPP5P+e V9axucUFV+634d2gdqEfz6faqmXUiVVH2og1rTyTsild5XDdNFG5OARFad/wczyJYT0K jKLKh0IU/x947v6g8IHB260CGBx9tJnm3T1kXNjOx88lVkMfdhSdWZ1phgjKeRP11TJ9 jmSQ== 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=TW7DkkswHlR4KM4PGtgDwFnwF9SLDOBIIupHoYtIVkk=; b=gPBUAlOOq1qp0rOj5g8krlwkKqx52CBCB+6BZBIy0kG3kc1DHMvjPPBOQLYFV69xeg qkhkMe2yTE9q5hHLSIJZC3QMcDESB3qfgmyC1kO/IgP1sjCbUzHRnyg6Pg3BoSXjUbfC uzuDnBN+MzR1Irsn3wNbs/3KFJyKsg6gVmUqGV36QRjvbwCNxTJa7FgX4q50hJO51Nmn T1LOprqZHPpeY4wABWGFvLtOn1mvX42r3u+zI4LICggTJ4+fb7pU7iiXUSvxzWSvgvGR 1a1oc6A433cZAzgip8wPSgdI7gGyHBPy2bxIItSpHIkh9LIbyKNyA6ag6zrTXoK9QHYL ifbA== 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 q18si1111013eji.611.2021.02.08.06.09.04; Mon, 08 Feb 2021 06:09:37 -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 S232622AbhBHOEC (ORCPT + 99 others); Mon, 8 Feb 2021 09:04:02 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57072 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbhBHN5q (ORCPT ); Mon, 8 Feb 2021 08:57:46 -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 09/24] net: stmmac: dwmac-rk: Cleanup STMMAC DT-config in remove cb Date: Mon, 8 Feb 2021 16:55:53 +0300 Message-ID: <20210208135609.7685-10-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-rk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 6ef30252bfe0..01c10ca80f1a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1433,11 +1433,14 @@ static int rk_gmac_probe(struct platform_device *pdev) static int rk_gmac_remove(struct platform_device *pdev) { + struct stmmac_priv *priv = netdev_priv(platform_get_drvdata(pdev)); struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev); int ret = stmmac_dvr_remove(&pdev->dev); rk_gmac_powerdown(bsp_priv); + stmmac_remove_config_dt(pdev, priv->plat); + return ret; } -- 2.29.2