From patchwork Mon Dec 3 12:20:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10709425 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 496B113BF for ; Mon, 3 Dec 2018 12:20:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37ACA2B4D5 for ; Mon, 3 Dec 2018 12:20:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B8CE2B4E2; Mon, 3 Dec 2018 12:20: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=-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 C2AFC2B4D5 for ; Mon, 3 Dec 2018 12:20: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=lxinW6K/yAv26V MTZYjcE0qPccaY4N6Orl6fFysBZzsZDskNHnuBM05ThT5adHgFwOFv9oiVn7Z2+m9yqOZ/0ettkg5 2jc9Rb0WwqoAt2gJo3JR97lmBQYx27J4PoLC6qwqTE87LO6upCxTQz3doS40JTba6CktXE31tw1kz 7fYJtFmAZ1O0mC0cBlQYSsvTd1u6oMocnHx02ggRmJzdHFsgGNPYL57xUS/7AYiCg2wq0dnYhxKbC zwzls9qc1NPA6rl5lnlvhfNKd21ExIAgqbV+HtNI/i5hu9PRJv+nHoE9mzbYdcZ57I8D9hvel0n3L UyP5OJO6CDbmPIquhWug==; 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 1gTnDa-0001Ts-Ou; Mon, 03 Dec 2018 12:20:54 +0000 Received: from mail-lf1-f65.google.com ([209.85.167.65]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTnDV-0001O8-LY for linux-arm-kernel@lists.infradead.org; Mon, 03 Dec 2018 12:20:52 +0000 Received: by mail-lf1-f65.google.com with SMTP id p86so8950525lfg.5 for ; Mon, 03 Dec 2018 04:20: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=atc9K/XTYTP/cxAx9Vip36EgzVJ85Eb29tYX1osDLuF3wU7wNoZniIYLtO6CHWG4YD 3RaYlB2G2T3gj/NHiL34K29jFNtvxHyVWDKTF9JHd1W3aPBI3g4Jjk91xUAZ+tcgvIH7 LEpSxHeD0KGK7bmSO8OUyTCuCwi8aEDvzDxGidpO/anI9xCCd69xT0CNPaoazrhYBk3t 04leuHYDlz6nm2wp2+YizR2hDWeY8NwSSVqZA8D1esxXj5xvnqppFvAULAthyTWMsgIW mJqsiIYZ/4vK3nCs32DheW9cbHTXnuerGsxxfVt1IY87RPjAkixjHWmzl2KrlKfnvMF0 HLxQ== X-Gm-Message-State: AA+aEWbHfvA8Tiqvuzj0CGIW5VwSFGJHYZNgQCBB347Tkft6McvAF8me FGMg+XbirCBtgsPWeplkcMA= X-Google-Smtp-Source: AFSGD/WUn+TU8jWSv6p2bow14ZEV4fNB+5lLXo3ld62urHnH5WLQdIkJ6KONpT1VZAHYGoeTi5pofw== X-Received: by 2002:ac2:4215:: with SMTP id y21mr6230009lfh.6.1543839637235; Mon, 03 Dec 2018 04:20:37 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id z15-v6sm2688556ljb.9.2018.12.03.04.20.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Dec 2018 04:20:36 -0800 (PST) Date: Mon, 3 Dec 2018 14:20:23 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com Subject: [PATCH v5 4/9] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: <397a0da87031430a4c50958f99f0b1e35cb01e85.1543837442.git.matti.vaittinen@fi.rohmeurope.com> 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-20181203_042049_784917_2595ECB9 X-CRM114-Status: GOOD ( 13.61 ) 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, lee.jones@linaro.org, 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; }