Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1115920imm; Wed, 1 Aug 2018 10:26:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe9eZqzJ1NNOKPy2/0IkGP82olmMerISwdsfklSfXi0BreeC2Cm486XfBJmhtPlOorg2Q5j X-Received: by 2002:a62:c4c3:: with SMTP id h64-v6mr27643261pfk.39.1533144390681; Wed, 01 Aug 2018 10:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144390; cv=none; d=google.com; s=arc-20160816; b=JOj/plxIXliQnsRAZb/ithol85FVyz9+3gIf+bdjVN9q0iUg7QBYceCJzOX6D/tVZ2 Nw4/fYUpsdx9tmQBYwEHajb1aDsVQCXgsZLPZGP4X76lyzczgXFn5WB4BdHUnJJSo9FA D/1tXUj3eBcayptfXdE+kPuQo/XrK1O1FLwgLMhm58TJ3bRZceHT/C6tHwnv63VRSiNx 0Qi185C645JlyD4Lb9PZu0HdCklzUGaYtS0X+H5CXIIFj1HHFimSde0SF2dXg8GBSZHA NdpXobEyK8AWE6WV6bwvqFKx/3AemBsApy51aFRCv4YJTqhhc6HqShybFQf+ddEGQOyt m0zw== 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=cetW+Z7kdKwT/xTlRjlG7eaIsl1r1I21dA42F8w/bQY=; b=iRUpFfV7bNMBgemKxC5u8WXiIN4bW8shXRPlpaY8W/RUGUeBalYe9QgGl1e4tHUjDe M5Ce1jtgqCT/ARY9MRuRgZdwOYTL9af+HWe/OUqsuAbpmF8rQBlZSPAH0z3N1Elo7Hpu 8iNMsUkCMNpSuqrdvtvebXKQ9u7Wl6i5oUKBEMLLX8bOyG39soB6tanJxTVPTiQE3ZI8 TjXopfpQVrfSQ7H0kwmhKoHTUH2Iqnkw8QjjLiCVmIidDISYyTy14sdMjAKVIx36zdLD K57UM3UnXU70XTL6PkdWwnv+LK8X5+lX30lFO6GxMKjnUyjGTF85VHjFf0GQW6ENgYM1 EU/g== 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 y6-v6si17180319pfy.140.2018.08.01.10.26.15; Wed, 01 Aug 2018 10:26:30 -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 S2406564AbeHATLJ (ORCPT + 99 others); Wed, 1 Aug 2018 15:11:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51136 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406206AbeHATLJ (ORCPT ); Wed, 1 Aug 2018 15:11:09 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0EE6DCC3; Wed, 1 Aug 2018 17:24:26 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anton Vasilyev , Andrew Lunn , "David S. Miller" Subject: [PATCH 4.14 236/246] net: mdio-mux: bcm-iproc: fix wrong getter and setter pair Date: Wed, 1 Aug 2018 18:52:26 +0200 Message-Id: <20180801165023.050065340@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: Anton Vasilyev [ Upstream commit b0753408aadf32c7ece9e6b765017881e54af833 ] mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer in device, whereas mdio_mux_iproc_remove() restores md pointer by dev_get_platdata(&pdev->dev). This leads to wrong resources release. The patch replaces getter to platform_get_drvdata. Fixes: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs") Signed-off-by: Anton Vasilyev Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/mdio-mux-bcm-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/phy/mdio-mux-bcm-iproc.c +++ b/drivers/net/phy/mdio-mux-bcm-iproc.c @@ -218,7 +218,7 @@ out: static int mdio_mux_iproc_remove(struct platform_device *pdev) { - struct iproc_mdiomux_desc *md = dev_get_platdata(&pdev->dev); + struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev); mdio_mux_uninit(md->mux_handle); mdiobus_unregister(md->mii_bus);