From patchwork Tue Nov 13 11:59:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10680395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6605913BF for ; Tue, 13 Nov 2018 11:59:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50A1129F3D for ; Tue, 13 Nov 2018 11:59:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 426CD29F91; Tue, 13 Nov 2018 11:59:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E7DA729F3D for ; Tue, 13 Nov 2018 11:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8ZP6tsZGTxewNaWC9OBecNMG2ahLcPcbsOwx6HVJi0U=; b=ZTyGt0mvMjK1Vc WMoZO/YskH6CXtiyuBoYpjfVvS4rn+yi9JVs1RfI2zkzQe4YrehvS93qJ1kCaSicQ0cnvHUmNSf3I 8HzhLSuMLwWsIFvKPswPE3kxtGjIUAZUZNkrBeDapnbWUp92UuMsjdWhZmZ17Rw1fZ0qRUZaj2vCW 83t+OnXStOnqs3jjQR6wS61fjTcZnYnXVGzyeAKAYNOwACjh+Koch8OR6RBta8jiCXByMszwysB8A 3npoJCE7o0AoKREHv1wPvxSKJPtPbXfDN7rNuubzvteb5r0x0R9ZqB8N02QAb+xJKkVFtcoaR5Tgc FLPLetOzH7b9jNU6NdsQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXMH-0003rJ-MY; Tue, 13 Nov 2018 11:59:53 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXMF-0003rC-RV for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 11:59:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4fWmEQHDymzQumdk/aytbyrz8Sfb7MJtwS0fcAz0+8Q=; b=jCkfC6aW7VDxfxy/y8Qd0PIHX G7yRTcJIQbqMoSfqCzn3XfbMoBXWMy+OPb4IR9DDgt2HnTU5RZ8Wgp5K6K2tHpOWWEbEvq8WyC516 zZk23Ysdahu5JS3MZd8SmM1FJT17F7+9/S4t6XUpq7P4MIzB13uPriJihZHQsP/G4oKg6epNMj3id GADAEQlXPs603kVvtuKxBDYzBprXaYgGMKmi1OkVOHQVNQmf8F3CgOEUDIKpFcjZn/F06vYhDb5dQ ICJAv2+ewNPCS3hCexDrv98OC7LTv1+wuOCZdIgipz7sxn80BNnHBaGN1ORfAv0ryEydwmmLSySTi kdUIR5Nfw==; Received: from mail-lf1-f65.google.com ([209.85.167.65]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXMD-0001nc-4P for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 11:59:50 +0000 Received: by mail-lf1-f65.google.com with SMTP id p86so8611870lfg.5 for ; Tue, 13 Nov 2018 03:59:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4fWmEQHDymzQumdk/aytbyrz8Sfb7MJtwS0fcAz0+8Q=; b=sEY212eHg6xA1HMaZMW7mZdThcXoShD13kUedykhB01lo8QAcwCI0cwgFzt3ZoI/pC MT7kufMcA7IXZJQV8vAOHaEAhHNdFVC/SPE6I5cbV9/fkehnlD8qnRJeMWtIjQ0snaWZ NxTOflfKDswD8/tGHLxRRwsWSY0v3zyA9qfxqAiqPsQUoRKYAeU1ubbKCdqMqMQHMh+3 YhubKMq3NzH8yg83YRTR7WW9QORuiIajUGl02ylJ+KIarY+8D3JBW9/du1T4FexuWkJ9 ehlJxYBBKOivzaNQW7l7e0NnZUPNHaabJGs1jO0SHTRc0ZCh/YGYLIiHWcuoXHaGoq0n 6ISA== X-Gm-Message-State: AGRZ1gJrng7FxI/a5dlqKR09dBJ/lAsH6UJqvXKe4koYBWhnov04HX/Q vXNhsBslvcMGBlqBLA96+uQ5iYQE8sA= X-Google-Smtp-Source: AJdET5eY5Y8Z+Wd+y8qQgdrwaMKb79bzHHDnnpRZ/qJOEzRVVyE3QH6UbsC9cFbqs3Ab3FvcXvg1Fg== X-Received: by 2002:a19:d5:: with SMTP id 204mr2618716lfa.116.1542110377098; Tue, 13 Nov 2018 03:59:37 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id g73-v6sm3518209lje.24.2018.11.13.03.59.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 03:59:36 -0800 (PST) Date: Tue, 13 Nov 2018 13:59:27 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com Subject: [PATCH v4 3/8] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_115949_166432_383C3FDC X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Michael Turquette , Daniel Kurtz , Sebastian Reichel , David Brown , Lee Jones , linux-clk@vger.kernel.org, Rob Herring , Jonathan Corbet , Andrey Smirnov , "Rafael J. Wysocki" , Russell King , Krzysztof Kozlowski , Chanwoo Choi , Andy Gross , Huang Shijie , Guenter Roeck , Bartlomiej Zolnierkiewicz , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Boyd , Matti Vaittinen , linux-kernel@vger.kernel.org, Akshu Agrawal Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm based clkdev lookup registration to avoid leaking lookup structures. Signed-off-by: Matti Vaittinen --- drivers/clk/x86/clk-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index 3a0996f2d556..25d4b97aff9b 100644 --- a/drivers/clk/x86/clk-st.c +++ b/drivers/clk/x86/clk-st.c @@ -52,7 +52,8 @@ static int st_clk_probe(struct platform_device *pdev) 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL); - clk_hw_register_clkdev(hws[ST_CLK_GATE], "oscout1", NULL); + devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE], "oscout1", + NULL); return 0; }