From patchwork Fri Mar 18 03:29:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Wangshaobo (bobo)" X-Patchwork-Id: 12784850 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A77D9C433F5 for ; Fri, 18 Mar 2022 03:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230325AbiCRDbO (ORCPT ); Thu, 17 Mar 2022 23:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbiCRDbM (ORCPT ); Thu, 17 Mar 2022 23:31:12 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 671E08F9A2; Thu, 17 Mar 2022 20:29:53 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KKTxK6Vd1zfZ34; Fri, 18 Mar 2022 11:28:21 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Mar 2022 11:29:51 +0800 Received: from dggpemm500015.china.huawei.com (7.185.36.181) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Mar 2022 11:29:51 +0800 Received: from dggpemm500015.china.huawei.com ([7.185.36.181]) by dggpemm500015.china.huawei.com ([7.185.36.181]) with mapi id 15.01.2308.021; Fri, 18 Mar 2022 11:29:51 +0800 From: "Wangshaobo (bobo)" CC: "chengjian (D)" , "liwei (GF)" , "antoniu.miclaus@analog.com" , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jic23@kernel.org" , Jonathan Cameron , "Wangshaobo (bobo)" Subject: =?eucgb2312_cn?b?tPC4tDogW1BBVENIIDIvMl0gaWlvOmZpbHRlcjphZG12ODgxODogRml4?= =?eucgb2312_cn?b?IG1pc3NpbmcgY2xrX2Rpc2FibGVfdW5wcmVwYXJlKCkgaW4gYWRtdjg4MThfY2xr?= =?eucgb2312_cn?b?X3NldHVw?= Thread-Topic: [PATCH 2/2] iio:filter:admv8818: Fix missing clk_disable_unprepare() in admv8818_clk_setup Thread-Index: AQHYOnLPy2RAllgaYUGUm5x4tyvPl6zEecaQ Date: Fri, 18 Mar 2022 03:29:50 +0000 Message-ID: References: <20220318025914.2614812-1-bobo.shaobowang@huawei.com> <20220318025914.2614812-3-bobo.shaobowang@huawei.com> In-Reply-To: <20220318025914.2614812-3-bobo.shaobowang@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.177.133] MIME-Version: 1.0 X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org -----邮件原件----- 发件人: Wangshaobo (bobo) 发送时间: 2022年3月18日 10:59 抄送: chengjian (D) ; liwei (GF) ; Wangshaobo (bobo) ; antoniu.miclaus@analog.com; linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org; jic23@kernel.org; Jonathan Cameron 主题: [PATCH 2/2] iio:filter:admv8818: Fix missing clk_disable_unprepare() in admv8818_clk_setup Fix missing clk_disable_unprepare() before return from admv8818_clk_setup in the error handling cases. Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Wang ShaoBo --- drivers/iio/filter/admv8818.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/iio/filter/admv8818.c b/drivers/iio/filter/admv8818.c index 68de45fe21b4..acb436efd8b5 100644 --- a/drivers/iio/filter/admv8818.c +++ b/drivers/iio/filter/admv8818.c @@ -590,14 +590,22 @@ static int admv8818_clk_setup(struct admv8818_state *st) ret = devm_add_action_or_reset(&spi->dev, admv8818_clk_disable, st); if (ret) - return ret; + goto out_clk_disable; admv8818_clk_disable() would do clk_disable_unprepare(), so clk_disable_unprepare() is not needed after devm_add_action_or_reset(),there is no problem in this function. this patch is not needed anymore. -- wangshaobo