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: 1479393 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=aCQP9dP6; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=oRCZlV8o; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FkGmX09ylz9sRK for ; Mon, 17 May 2021 21:16:43 +1000 (AEST) 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-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.35 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [45.249.212.35 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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+incoming-imx=patchwork.ozlabs.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;