Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2544457pxj; Mon, 17 May 2021 04:16:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcvETLn8B0LWuY+z472BqAv83ZnPMXBgdrObXcqy6exmkgDpqDI69/857UBQz3+KIUn2K9 X-Received: by 2002:a05:6402:510e:: with SMTP id m14mr33869627edd.320.1621250207546; Mon, 17 May 2021 04:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621250207; cv=none; d=google.com; s=arc-20160816; b=JWg6qgw10w9YURW18LE+dJkl+4DhGwKG+ym7uV4IsU63eLWuNUc3tsKuqKI1Yo/o2r kVzSlsvasMjFG5DjtHddI5XPL9ylAKjW+vZYYcdx4hd6imszDSMSVrzsopZkQlhKiMdH iZP8SYPkMKfS8ViCNu+upYTVjflH79Qsz3PO+p8/DCeHTy0yqKPMi0B3IHyrVlFYkNES FMJatWCdqPUd4X882xvofqbLQu7SfWjlnjAdfb7WmAeD4s8cOVELCjBWf9eAPQx2BF+O XekxRRVEa6esDd85E2uA6ZlUd7NHqIg/iJXLmx3w/DqrJiWnX39MbpYOyCqOuIzFOfEh qb2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=PWvAzYatKqX7HnCZkw6MUMyhBBtZ5jSvgQ0+ElRCtwc=; b=n28XRusEL5MkjtPRV7MD6lnNfpbTPBYD1hQZ72iI9Z3bipgqMliWRcRQ207/CJZgOZ JIIxoOC5Wdkzdoz3YTarGYor2bXOPCg/Gnfm4Ham3c7fZtuWHVuDaisKBcwcTp5GLw7q RSStV+jp7RVfUkAHI63ph4m89qil/zH06k+wRpYIzp129s5XKYiGAZR2j62URjMwu3cq XzYpOSVgOTcqsnPxPfg8qRD/57QBfC24yTh3zSWjGVN3UDPP+H8o0VhQXXnHyyV1KT+h pBnW6wW7YLI8jsDPG938ET7M+gQrTxdEKd0UT3d96EVXSJr8Pcqeu6uAhCAypoMfqNBa 0phA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si5585139edr.477.2021.05.17.04.16.23; Mon, 17 May 2021 04:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236681AbhEQLO0 (ORCPT + 99 others); Mon, 17 May 2021 07:14:26 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:2953 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236679AbhEQLOY (ORCPT ); Mon, 17 May 2021 07:14:24 -0400 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; -- 2.25.1