From patchwork Tue Dec 4 11:37:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10711581 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 5D4C1109C for ; Tue, 4 Dec 2018 11:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B3172A4CD for ; Tue, 4 Dec 2018 11:37:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E64B2B734; Tue, 4 Dec 2018 11:37:32 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 B79AA2A4CD for ; Tue, 4 Dec 2018 11:37:31 +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=Bj85HQydJjcE2NdNkr71FsMX1jdknW/AWvhC2H1lUUA=; b=UKUuFlHdRMVG1Q zWG2Zw8jHbkuD46wBHpOPfYCmOwjGIqbaYwEqf6amvWd5+2LEZLpynVF6wZiZ3vPVfk5N1sy7oFd8 mrDwpu2MG7YLRYvv9M3k5c1ZrcgQ7epSgjLr/l6wvKa4VVsAIu1zOSIbv/hSYVX3xlwAty6J2pAZ7 8sF+WuQ5uWO49o3/Lyy1Ai2CIsrh7lgxd78V6qdMNV5/04OXVlsEj3SeDt4fJuMlAx2+ZHruRZIZ0 ewryTpSiHpH/1BMwt6wvaRuaXJWOqfbL9QPV/fs45tMo1cl2QlBYb+O76Y1cLdgC5gUeG4FeQIeK0 NCpDXlZSNFwU7RiLcvWw==; 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 1gU912-0002VB-09; Tue, 04 Dec 2018 11:37:24 +0000 Received: from mail-lf1-f68.google.com ([209.85.167.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gU90y-0002U4-Sn for linux-arm-kernel@lists.infradead.org; Tue, 04 Dec 2018 11:37:22 +0000 Received: by mail-lf1-f68.google.com with SMTP id i26so11705738lfc.0 for ; Tue, 04 Dec 2018 03:37:10 -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=IPaANYg+BKvew3Ns6tmkF9qat1yGp0JhQQkX999AOmA=; b=He630TzMXpyQD3+hUzpGkY9SWvlwHNU49oq75UwbKBGq6IkzdjA1oKY5kE409+9dRF C9PrFMT+oWIjPxsNV67hO6sLTF3B9/fwq3qQ+oFEEq6oF7GxxFHr1Ze0eIHq08V0yJQk pAaNfr8u320WtZv8zBlvSyAxU00VNX7cib141UIjUibhF1L/KXX5BurbecXBHOaVkuLT 8lw6VQU5D4/Smdd0gDUkPOOoH+GkmJmpCSn53ySwaGOmfwX7Acsays2slTxOyvh1X1Po 4tCUiL4VZh8my0eNLu1+fmPgOamPIKodf6wnPRB6FkfZehN+rOcUX/pYMnwlcsJSM6FW BqrQ== X-Gm-Message-State: AA+aEWbTJ44l7XJQzMIc6K02d0Lpa85yYFTb8wwRPYztiiTAqcGE9Vo3 LpkD00YF8h2k2gqlC1d/jOE= X-Google-Smtp-Source: AFSGD/Vp5vXzXS4X9QTXmNF5hhCzfpnIqUNuj24oPKEvSrTWjEa04sxBZOR8RlzvO3cj6YwgW26BQQ== X-Received: by 2002:a19:db4a:: with SMTP id s71mr11966423lfg.36.1543923428923; Tue, 04 Dec 2018 03:37:08 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id a20-v6sm3086214ljf.28.2018.12.04.03.37.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 03:37:08 -0800 (PST) Date: Tue, 4 Dec 2018 13:37:01 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com Subject: [PATCH v6 05/10] 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-20181204_033720_953737_7235F8AE X-CRM114-Status: GOOD ( 13.24 ) 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: david.brown@linaro.org, linux-clk@vger.kernel.org, b.zolnierkie@samsung.com, sboyd@kernel.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, rafael.j.wysocki@intel.com, linux-doc@vger.kernel.org, linux@armlinux.org.uk, krzk@kernel.org, akshu.agrawal@amd.com, cw00.choi@samsung.com, djkurtz@chromium.org, pavel@ucw.cz, pombredanne@nexb.com, andy.gross@linaro.org, andrew.smirnov@gmail.com, sjhuang@iluvatar.ai, 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 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; }