Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932980AbcKYRaj (ORCPT ); Fri, 25 Nov 2016 12:30:39 -0500 Received: from mail-db5eur01on0069.outbound.protection.outlook.com ([104.47.2.69]:20080 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932359AbcKYRah (ORCPT ); Fri, 25 Nov 2016 12:30:37 -0500 From: Madalin-Cristian Bucur To: Johan Hovold , "David S. Miller" CC: Florian Fainelli , Timur Tabi , Andrew Lunn , Vivien Didelot , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net v2 4/5] net: fsl/fman: fix fixed-link-phydev reference leak Thread-Topic: [PATCH net v2 4/5] net: fsl/fman: fix fixed-link-phydev reference leak Thread-Index: AQHSRn/DERmJ5tytq0OM1tcpKyZw+qDph3sA Date: Fri, 25 Nov 2016 10:54:27 +0000 Message-ID: References: <1480011691-13278-1-git-send-email-johan@kernel.org> <1480011691-13278-5-git-send-email-johan@kernel.org> In-Reply-To: <1480011691-13278-5-git-send-email-johan@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=madalin.bucur@nxp.com; x-originating-ip: [188.27.189.60] x-microsoft-exchange-diagnostics: 1;AM4PR04MB1601;7:TJCW928j/y/LKBeyajfVfuXJ2WlDEmy6M3g6dUkLORhTLiRf/1rICxIjJrGRFROWCX0AAgb03NbYCcaLI0YOkUnU8xy/Ynxe2ZwfeoCW4DQFKeCq6yOcNwruO6Cs9mxzF+I51bOgpvY9LxRQWrNe5EKB9qj2R6jiW0Jbkqe5w1LkIlKttu7XwoUKYiOK+spRVFuZxyS8/ucgeWFe5sYVc1s+6o1Y1ezYXLyG2AswN2RKV+Qy2Pll81Mib+D7jcDzS5WBtSuYoFzq6YLjPFeNPqSqXeusaPlgwAt196VYnP01NQH8g9zELTYRYUQRFvYAu2BkTILDMk2Zrd8zbA94tWgw1ZN4aQsVB3iUVLW9ycI= x-ms-office365-filtering-correlation-id: 53afbef4-e892-443f-cf64-08d415216d3f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM4PR04MB1601; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6060326)(6045199)(6040361)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(6061324)(6046074)(20161123555025)(20161123564025)(20161123560025)(20161123562025);SRVR:AM4PR04MB1601;BCL:0;PCL:0;RULEID:;SRVR:AM4PR04MB1601; x-forefront-prvs: 01371B902F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(13464003)(199003)(377454003)(189002)(189998001)(54356999)(39410400001)(81166006)(68736007)(50986999)(86362001)(66066001)(39380400001)(3660700001)(5001770100001)(81156014)(76176999)(575784001)(8676002)(77096005)(76576001)(6506003)(2900100001)(229853002)(122556002)(2906002)(7696004)(39060400001)(2950100002)(5660300001)(38730400001)(3280700002)(305945005)(97736004)(105586002)(7846002)(92566002)(33656002)(230783001)(106356001)(4326007)(8936002)(3846002)(9686002)(6116002)(101416001)(106116001)(102836003)(7736002)(74316002)(39400400001)(39450400002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR04MB1601;H:AM4PR04MB1604.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2016 10:54:27.5523 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR04MB1601 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAPHUjwT016333 Content-Length: 1046 Lines: 32 > -----Original Message----- > From: Johan Hovold [mailto:jhovold@gmail.com] On Behalf Of Johan Hovold > Sent: Thursday, November 24, 2016 8:22 PM > > Make sure to drop the reference taken by of_phy_find_device() when > looking up a fixed-link phydev during probe. > > Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") > Signed-off-by: Johan Hovold > --- > drivers/net/ethernet/freescale/fman/mac.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/freescale/fman/mac.c > b/drivers/net/ethernet/freescale/fman/mac.c > index 8fe6b3e253fa..736db9d9b0ad 100644 > --- a/drivers/net/ethernet/freescale/fman/mac.c > +++ b/drivers/net/ethernet/freescale/fman/mac.c > @@ -892,6 +892,8 @@ static int mac_probe(struct platform_device *_of_dev) > priv->fixed_link->duplex = phy->duplex; > priv->fixed_link->pause = phy->pause; > priv->fixed_link->asym_pause = phy->asym_pause; > + > + put_device(&phy->mdio.dev); > } > > err = mac_dev->init(mac_dev); > -- > 2.7.3 Thank you, Madalin