Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbdC1I7t (ORCPT ); Tue, 28 Mar 2017 04:59:49 -0400 Received: from mail-eopbgr30071.outbound.protection.outlook.com ([40.107.3.71]:56685 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755202AbdC1I7p (ORCPT ); Tue, 28 Mar 2017 04:59:45 -0400 Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nxp.com; From: Daniel Baluta To: , , CC: , , , , , , , Subject: [PATCH v3 2/2] ASoC: imx-wm8962: Fix codec_clk cleanup Date: Tue, 28 Mar 2017 11:58:52 +0300 Message-ID: <1490691532-2086-3-git-send-email-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490691532-2086-1-git-send-email-daniel.baluta@nxp.com> References: <1490691532-2086-1-git-send-email-daniel.baluta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.146.1] X-ClientProxiedBy: AM5PR04CA0020.eurprd04.prod.outlook.com (2603:10a6:206:1::33) To AM3PR04MB498.eurprd04.prod.outlook.com (2a01:111:e400:8826::23) X-MS-Office365-Filtering-Correlation-Id: c97c0fab-e182-4aa9-21bc-08d475b8ae3d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:AM3PR04MB498; X-Microsoft-Exchange-Diagnostics: 1;AM3PR04MB498;3:QP3r6wdZUaI51ZaH9ouQE8Jij5mm7pUP+CelxHOOh6DNnr4Ha4PqI4dptASAO9/iuJP85tcPbVEjOQJSY2n2DdbO5GXXKkw+xQyZoO/mk7h+j2Ukx1jboArpa3cH9X73258zbW7lyDQg5hPR8UIG9mzj8uQs/LDRgWlX/0FTUrEKa/eGUX1b6FgNRCzolspBzMdbJpEfB3X8e2zwPN1i83wUPxOb/1se1e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hTdEoq9EU+za8PIaPzi+EUrqVXVhAs/Wob073muathxwxojI+Z0+JVejcHpfQ1m70LIU9uKt7Q65ZY6xMJMWLHptSdoIst330VtV7ORC2dLyf2dRoTRg03iGHOCF8tGu3SSJ4xCmyBnQCYKnRM+JYpWFQFSHZv0tlyaoSG9FM30Uij7c/+8UkpMDD9Zuu1dbJGIe27tXGP0CpstQtgjoV4F71x/qEi8v4V51pXEMIbfFwjVOF5SZvNaXDkCqGHu56RV+XkqVDveZVI/PAVEoMbC5Xn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123558025)(20161123555025)(6072148);SRVR:AM3PR04MB498;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB498; X-Microsoft-Exchange-Diagnostics: 1;AM3PR04MB498;4:vInb8y/l6HxK6dHLK6KGAYintQ/QqfJIct9Ff4Im2Df5yodtTqQB4JIJWdctiTM4ZxOiQy3NFXZyCEGgMfGzRoxcYZCv7Hcba5Lf0MwId66xr1YvcQBjYUr7NyZ84tvX6vl/jKFfAbHQ24J1OhyM94ZSiMJ/3Aglf2glZOiCY6DgX0FRsP1ikJhc8rvhwXTI+XntUyZ/3mCKLBVkEIWIQwxHtUHdU+KzlpMqsfl1YYOG5a4CgWQJMloIdA8Moa43UYR1nqpkz9bXb6wkilrBMv9FPRbRIuXjnMetMOoYEp1iXVFKKKa2MGI5Srh24L5+ngk7rrj7w7rqpnklvhJKPcCCmdsHcDpLb7XxOrLgGuDUA4u/ohMGR/e+vbQ/TL3f3+brs7+QnMa/xXkTnx1Dlcm7b6GfyTyLmSx4Tr3C0RAA4AbkOAeXDuHqWWJg8q70Z6PkmtIGHDUFy+5XzUuDRsogMXSagWoLkePBhZNpMWkIqG5TLVu4gPwjgG6VlbboRerHV0Oy5sLglDVhPA6IlbHRcVLAq3Qpj4y7pht9m7+gz8It9ldVEPt2jacsGpjXG3+bQXHkBHxNQz3mNVIFFeJKjw6BKb04tBk62ugaVOFBK2D3FEqzW3srgdOsDuSbkPO5wWYlbUKrN60iXSDKWUZ5FYVil86/SysJdQsuSS8= X-Forefront-PRVS: 0260457E99 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39860400002)(39840400002)(39450400003)(39850400002)(39410400002)(50986999)(5003940100001)(76176999)(7416002)(2906002)(50466002)(38730400002)(66066001)(86362001)(33646002)(2201001)(6666003)(5660300001)(36756003)(4326008)(50226002)(25786009)(6486002)(8676002)(81166006)(6506006)(2950100002)(54906002)(305945005)(6512007)(189998001)(7736002)(42186005)(53936002)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB498;H:fsr-ub1664-118.ea.freescale.net;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM3PR04MB498;23:bWDLawZwZHCxRIfWLRDgWrP6yUgCWaU/8BnJ1gpZMo?= =?us-ascii?Q?mPv34i5X9/taT6YVov5xzKvQkehVhqN2K3rinku/+HnYVLdd23XGuOtAaxDK?= =?us-ascii?Q?tikHKz1xuw+jNXUdHH+ALYca/GR686+WkmhxgLtEJXKAU9J0bEeEJ7oHt3Yp?= =?us-ascii?Q?RQzDhs3EI4b036ADXS+r7spfAUTqfRSErhWpYBAYa4XFMM+Wt3GNQGPNzEp3?= =?us-ascii?Q?ynDa/Z6Dwgv2iiM0+JzJzsUIuhGKoZBhiGV34SwNPTLNLmaaw58SdzQ+duTW?= =?us-ascii?Q?+bQg/mTJLwDgUAdX2/Jgja1EbN03pu6auQxqnswDd50Orajy4IaWTFaK0suQ?= =?us-ascii?Q?3KxCuC+FGQReOy/3ds+sjTUWbZy8Ericn4YfqVgMXr194mvyvMNcH4JRjZs6?= =?us-ascii?Q?0+2dELHmTE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bdwLooZ+sy5C1NY5MefzPDVp+unR9r0bj9Jp4URzXcGmnF/xffYG01MiC9hdlmbPRQ4H72Wus+kHZQJ9kvON9c=;5:XvXfzacAgjxNx5Jn+OsuNTZLW+dgWqyGFyvdnkh9sKEhTuq9louVY1/Q/edWAhhCJPMXupfa89hk3tJ7y1gFLYsOSJBwI7hvn1kXTs0Tp1BaRcN0kmnb1gb6B5rTGKF8moHrRV7sQ+6UmKlyFiYAOg==;24:orEQPRNc0ZoYA9V7Zgf2SZpbhNsgZOXuA6luKULCCoDXt2giUAQRP8EOE87e8oEC+1J4MJ4NdbzgMRMhOuq6jVzSOjplljISHI3q+b/m0MU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM3PR04MB498;7:9IS1BU2Ek+W3iXzrzwXt81uSqwDZopr2g4e3VlnPcjQtIWImj715ZHn7yIM2kCjptQC0FhAY/6WSjEms/FxFud62ZC8CKVRHQOOoA24gmEUFxQmUgqzuUxCMKvqYxoRcDRTSr3rAFqdZiX5ZkTLOQPIzf8S88TjHgbYGUYxA+KG5dQSd3dPjbTf4KOCEjW+rJ0OyHR+v416h5uhp75TliiDAjmNrURH4Q0H6Qb7v/pUk1NJyvokjhENXP3aByCKAsXgYW76IgudaHV1MVAJrTkqLolvqRGBIvtEa4y6wD5Q/u0GxXDSJv02Oj3H61FMSvDyOgkQCAs/ysygKFVSfPQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2017 08:59:01.7001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB498 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 974 Lines: 31 Resource managed devm_clk_get only works with platform's device dev. Reported-by: Nicolin Chen Signed-off-by: Daniel Baluta --- sound/soc/fsl/imx-wm8962.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c index 3d894d9..52659fa 100644 --- a/sound/soc/fsl/imx-wm8962.c +++ b/sound/soc/fsl/imx-wm8962.c @@ -231,7 +231,7 @@ static int imx_wm8962_probe(struct platform_device *pdev) goto fail; } - codec_clk = devm_clk_get(&codec_dev->dev, NULL); + codec_clk = clk_get(&codec_dev->dev, NULL); if (IS_ERR(codec_clk)) { ret = PTR_ERR(codec_clk); dev_err(&codec_dev->dev, "failed to get codec clk: %d\n", ret); @@ -239,6 +239,7 @@ static int imx_wm8962_probe(struct platform_device *pdev) } data->clk_frequency = clk_get_rate(codec_clk); + clk_put(codec_clk); data->dai.name = "HiFi"; data->dai.stream_name = "HiFi"; -- 2.7.4