From patchwork Mon May 17 11:15:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12261623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A424FC433ED for ; Mon, 17 May 2021 11:18:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67D32611CA for ; Mon, 17 May 2021 11:18:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67D32611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=gu71ZcLF9TsI1is1tcImuiPXERHf2m5uzrS3/kNU5G0=; b=aCQP9dP6H0yytiQ+HjlBP6NPSb hKQIckemPOdblEYMxqQaOGKpklzZqIYH8WaMpx//zkYUema9TQhkBHYgzcVyFLWEy+6mhMZTzz1Wg qjDy5OvhymAte97lVNmsQDnl5OXOp6LUWA1YE+G4JvAbzOB1rzwT0bBmi9JUnNSQtKCLB7iSeGqs4 M988tB1KmbzExznxZfuoWmOhTX7jzgKekZ7Ol34gu8zG4hzdVRglNRIVrR6/3PE+Do2GzFXfvoGGE ZS2ilxGl4Reaovt39Bg8/sRcSYo+jrGxyGl3iqCeUmr7ppLGd8DXxOE4X64v366P3v9DArZ/xqSBn +KJt6raQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1libBp-00EhAm-Ei; Mon, 17 May 2021 11:13:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1libBQ-00Eh8p-GV for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 11:13:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=PWvAzYatKqX7HnCZkw6MUMyhBBtZ5jSvgQ0+ElRCtwc=; b=oRCZlV8ovy7Hu/e55p08dTDBB/ Pm9hrKo7ZgGcpaFZ6Z1N4p/TKnHDXkXl2mucwBtMDgmBJcGo4Wqr7FgLeTe2AxI9qlpTJ92OEQHme 7QqVb+AhXsSY4SB6LMdabp3uvBpdDctr/qr5TDnnuRDrCuX09vf8PStrB31AsXufSTZLesRC/IHa8 TZNl7j7qYsm07n7cLplwE6jQjOE499EeN3Vw+c/zs/Fn0XgGQxgG7kRN6PJfiFK7eNbUncdI5Qbme dTt2OwkJFT3c8yq8/2i9G4whwDAO33AuK1TQq+PjUlLYSD22xetySI/MQSz0bXNn+ketpob1BsvjU eG0zKsUQ==; Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1libBN-00Dhp9-OI for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 11:13:11 +0000 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FkGd83pSrzCsgp; Mon, 17 May 2021 19:10:20 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 17 May 2021 19:13:05 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 17 May 2021 19:13:04 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH -next] ARM: imx: add missing clk_disable_unprepare() in imx_mmdc_remove() Date: Mon, 17 May 2021 19:15:23 +0800 Message-ID: <20210517111523.477889-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_041309_979087_93D2FD5F X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org clock source is prepared and enabled by clk_prepare_enable() in probe function, but no disable or unprepare in remove. Fixes: 9454a0caff6a ("ARM: imx: add mmdc ipg clock operation for mmdc") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/arm/mach-imx/mmdc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 0dfd0ae7a63d..7d87fa8c70a9 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -77,6 +77,7 @@ static const struct of_device_id imx_mmdc_dt_ids[] = { { /* sentinel */ } }; +struct clk *mmdc_ipg_clk; #ifdef CONFIG_PERF_EVENTS static enum cpuhp_state cpuhp_mmdc_state; @@ -463,6 +464,7 @@ static int imx_mmdc_remove(struct platform_device *pdev) cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); perf_pmu_unregister(&pmu_mmdc->pmu); kfree(pmu_mmdc); + clk_disable_unprepare(mmdc_ipg_clk); return 0; } @@ -536,7 +538,6 @@ static int imx_mmdc_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; void __iomem *mmdc_base, *reg; - struct clk *mmdc_ipg_clk; u32 val; int err;