Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112102imm; Wed, 1 Aug 2018 10:22:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpceFXk/mG8G/pE0hRO+KP2bzhtQLtxAUwstAXTQzh6u7yHyEl83qPPEOjatcG3LFC2o4EKo X-Received: by 2002:a17:902:8215:: with SMTP id x21-v6mr25267161pln.175.1533144153917; Wed, 01 Aug 2018 10:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144153; cv=none; d=google.com; s=arc-20160816; b=PUPqq2NVl8osJF/en4QbOyJ4Z73uI1x5VqQkEV5P7Lxe6FUrQyR3tG7eoZ92c2LPVk dBJeZlT93gjWchbj0TcwPwEv1fc7kETcy9n9nZm1FmyHlJFyAACRag32XB33VsGLQiJL RhZ2YOt6ZzU39cXyLv/MqWNiOUoo7cw10k5yLYXzEZ/JuPFGtMMqIyGSyBx227KjT8Pw Em+4CU3CypiaF2Ci10GSifubldWW8d9tJ/eDxOY0TMwPNqUHTSVFkEccn/hm3v5fXJcC EoGfe2t75Q9U1hSlcYhx11B3r7F9jAbTcWZrdq+wNHLJE675aESHOm1MEl56zF4D0ojO L5eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=d2Ebp8NdapHtsQZKrwW9VkXGRpPS7WzhCDw9WVx/NJ8=; b=sYgiVaQFmy7kmZnf8BQ3hEZwkclFzU9bAfDV0MVylBY+EIZJWe9yVJDdOTetWpoJTm yiCoOhzCcSeZfdPDLmqsglu3ZJSL+0N8LhML4vhwDQvWPX5NKDf2TKf7h1rThTt7C0TF BZ03NyckJAww48lVR3JQAOVFWE3nJvKqm/pKXlPC2kQBlSEFCsq2gEZ5bp1AWOIp2ZzJ ytkr/0B/Y35qyZd+0w4fwhdhZE9eJIdPl63j6Kw+rKA+69jG4DPWNrd7VjCUy5mO0Upk AYVwg5Z9aj19gExVzTYqjDGsqVXws1vnE8/tLRVZ5myqZaCZVBAra3V5IbMLMzcj1C7F p20w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h25-v6si16458438pgh.119.2018.08.01.10.22.19; Wed, 01 Aug 2018 10:22:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405446AbeHATHR (ORCPT + 99 others); Wed, 1 Aug 2018 15:07:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49158 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405438AbeHATHQ (ORCPT ); Wed, 1 Aug 2018 15:07:16 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 59722CE6; Wed, 1 Aug 2018 17:20:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 149/246] net: phy: phylink: Release link GPIO Date: Wed, 1 Aug 2018 18:50:59 +0200 Message-Id: <20180801165018.869612188@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fainelli [ Upstream commit daab3349ad1a69663ccad278ed71d55974d104b4 ] We are not releasing the link GPIO descriptor with gpiod_put() which results in subsequent probing to get -EBUSY when calling fwnode_get_named_gpiod(). Fix this by doing the release in phylink_destroy(). Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/phylink.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -561,6 +561,8 @@ void phylink_destroy(struct phylink *pl) { if (pl->sfp_bus) sfp_unregister_upstream(pl->sfp_bus); + if (!IS_ERR(pl->link_gpio)) + gpiod_put(pl->link_gpio); cancel_work_sync(&pl->resolve); kfree(pl);