From patchwork Wed Oct 31 08:32:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10662177 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 578F114E2 for ; Wed, 31 Oct 2018 08:32:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40EF42A317 for ; Wed, 31 Oct 2018 08:32:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3430E2A338; Wed, 31 Oct 2018 08:32:52 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 D84A02A317 for ; Wed, 31 Oct 2018 08:32:51 +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=lzTTL4ZauqG+LAu44m2PPBVvqGlxJ5Vj5qOLoJCVYdg=; b=bFzstfUVBOJR+8 Ihfrmxd2GwH/CE9+7ejZ6JvEle1xfWJUrU/0fmKYp8YHcrZ0Ze/X85NKDFP+CUJLT1Lu1DGhC6kTe fLnl+m8mJoGrkkBcLhDzxAR4LC2K9Eu7Ke5pNIIZ4zi0sYtdaJXnnOBAUrDEUDt7yz+k0OjWElMUZ EUIpfs2NxrA52KL1iHBRPQFyQDAHePXl8Abpkx+SXPMc0IuXlGrPIOV6XrdPVeCo1IvtmT0Wxqh8F gCmN/DxBBbYAPiVMHa6RZ3CWgzeXqp2A3bP7NjbgLjepMGKjjHfIrJ8CGaqlxgGygpMC+TLDwC9Zl HHRI2NQjZZoidUdQoDrA==; 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 1gHlvm-0007C5-9W; Wed, 31 Oct 2018 08:32:50 +0000 Received: from mail-lj1-f193.google.com ([209.85.208.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHlvi-00079w-Gr for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2018 08:32:48 +0000 Received: by mail-lj1-f193.google.com with SMTP id z80-v6so7945969ljb.8 for ; Wed, 31 Oct 2018 01:32:36 -0700 (PDT) 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=COmn/EezDX/GWsah2t8NJRxiKg5KtxdFjJeZJYU4E4A=; b=savYeh0SkniBD7Us+SatQHEfv8JS+ru301rBAZc49rPgUJ5doDUxIRP7yLSgX3arWb MGWWPcMTgIysuciDC6Y2LfK7p3K0vq9hiYKlFN9EkztiSSYYl4TMHt4OqWUO2sguIONE Ycn8GUwi54pZaEVexZqj7s9RMg0wygxJEMHJdHu/JCva8yqsfp50ZpPaeJ0Z6Aywofkl gpPNXep40qWDEHVd/vceLRfcrODTENZw6dki5prd+xQBRVhh4NhxzeHl/J4UW+5VZXSv koUZlK4Y63EujQKSZ0uUkaNJY7lcVPbeWl0gBIMd8+oy5r8lGW4j80luXhVaIsHe/kdS PtlQ== X-Gm-Message-State: AGRZ1gKo3uQAthAZWMzhjX63fyvGz4dHniAHR+aXqN5epax+hLOBaFWX PXgrvQ1Y2lRkvtq4B/S9/ao= X-Google-Smtp-Source: AJdET5dN5g/dAlTN28IcLopaJGJqDFRn9JUStvqdSb8+QrYQcyIrmuQUnYRVAQPdJ563Hod4iCxVeQ== X-Received: by 2002:a2e:1510:: with SMTP id s16-v6mr1345261ljd.4.1540974754722; Wed, 31 Oct 2018 01:32:34 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id j13-v6sm3966819ljh.42.2018.10.31.01.32.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 01:32:34 -0700 (PDT) Date: Wed, 31 Oct 2018 10:32:21 +0200 From: Matti Vaittinen To: Jonathan Corbet , Michael Turquette , Stephen Boyd , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Russell King , Andy Gross , David Brown , Kukjin Kim , Sylwester Nawrocki , Tomasz Figa , Andrey Smirnov , Sebastian Reichel , Guenter Roeck , Rob Herring , Matti Vaittinen , Huang Shijie , Akshu Agrawal , "Rafael J. Wysocki" , Daniel Kurtz , mazziesaccount@gmail.com Subject: [PATCH 4/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-20181031_013246_639393_3B283AD7 X-CRM114-Status: GOOD ( 14.50 ) 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-samsung-soc@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, matti.vaittinen@fi.rohmeurope.com, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 fb62f3938008..32d8df9bd853 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; }