From patchwork Fri Dec 7 11:10:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10717973 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 A4864109C for ; Fri, 7 Dec 2018 11:11:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E0722E248 for ; Fri, 7 Dec 2018 11:11:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80A162E356; Fri, 7 Dec 2018 11:11:16 +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 3AECE2E248 for ; Fri, 7 Dec 2018 11:11:16 +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: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bj85HQydJjcE2NdNkr71FsMX1jdknW/AWvhC2H1lUUA=; b=RVzH9QTYnBijcs nIVVovW1wLuFR2jY1425y0hzy2LV0BZiD5dFOpE/kFDHPLXpnlljv55Mfrq8jUldB2Az7bpY2y6RC hJ4UmQK8fKQAC+iTq70WAU9TLU/D+s7g5bxYNTu2SCbSOGEfc7cF094euawG2qXLABwI7ez4zLO+m 5RswtWP3VwAx0eWmVnL5Dz+CpdwB3UVLwc4PnMr6pAhRXXwY+SuKBLw4SP4JM7gMbpHECpGH7qZ0q QLbrqcfcHDRAzc4fmVlG6PxABO3GXyyTjzDbdGUDdKwAmL9zuO56Lr11wqtyWI49NiIJX4JbcF29p 6my5QFOT7vYRrKOWFD9w==; 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 1gVE2M-0007QG-63; Fri, 07 Dec 2018 11:11:14 +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 1gVE2J-0007M9-Eq for linux-arm-kernel@lists.infradead.org; Fri, 07 Dec 2018 11:11:12 +0000 Received: by mail-lj1-f193.google.com with SMTP id n18-v6so3203448lji.7 for ; Fri, 07 Dec 2018 03:11:00 -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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IPaANYg+BKvew3Ns6tmkF9qat1yGp0JhQQkX999AOmA=; b=DhKREUIgeCAl8rCb4187t9PeS6a5fLRe5AfolRZQ/JBpLNaQVCXlK2ZTBWIrh1oKeS g4OVy0Xnjx1rY/DKVYcrNvamPvi7rFnWwSND48eiiuxboLNKofNewqxOG+R8bBMafPiP gyEoyplPs+YrOwWW+ZTwF/Yyy75d8VUVVV+Y1I/kLwsYEk0Xuf67SZiPE0jq7Rv4wOCx naQbsrNqSUSg1c/FDelnFQI44cnly/VmnSAL8iAbt+p1x/4qyBz9a3y6lVPj44LbxA2A r2rfoEqmK4tJxWtEdrVI/gpUnvP4DN4rSG0IGZsVC4yDIyZzXObjVy5YBed68BMuHXzZ lVsg== X-Gm-Message-State: AA+aEWavP4avmL2R16K9byllxSS7VhwOI/ypIrpuz1sZ4zJNY9hzevod IDWnUCl9C3rl1Rjk+OfdYqA= X-Google-Smtp-Source: AFSGD/XfomwTlfwAe22p+SJG0lO7BIYoQtcGAA7ynED9gQVIJ8DPFu04mYExY5/4RW93QAjgp7daSg== X-Received: by 2002:a2e:197:: with SMTP id f23-v6mr1095815lji.144.1544181059423; Fri, 07 Dec 2018 03:10:59 -0800 (PST) Received: from localhost.localdomain (84-253-205-125.bb.dnainternet.fi. [84.253.205.125]) by smtp.gmail.com with ESMTPSA id q127-v6sm571001ljq.45.2018.12.07.03.10.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 03:10:58 -0800 (PST) Date: Fri, 7 Dec 2018 13:10:51 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com, corbet@lwn.net, cw00.choi@samsung.com, krzk@kernel.org, b.zolnierkie@samsung.com, mturquette@baylibre.com, sboyd@kernel.org, linux@armlinux.org.uk, pombredanne@nexb.com, sre@kernel.org, vkoul@kernel.org, linux@roeck-us.net, pavel@ucw.cz, sjhuang@iluvatar.ai, andrew.smirnov@gmail.com, djkurtz@chromium.org, akshu.agrawal@amd.com, rafael.j.wysocki@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 3/3] 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-20181207_031111_498582_77CEA81E X-CRM114-Status: GOOD ( 12.44 ) 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: , 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; }