From patchwork Wed Oct 31 08:31:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10662169 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 4836B13BF for ; Wed, 31 Oct 2018 08:32:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32A9D2A32E for ; Wed, 31 Oct 2018 08:32:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 253722A348; Wed, 31 Oct 2018 08:32:18 +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 CA3E32A32E for ; Wed, 31 Oct 2018 08:32:17 +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=UM8LqNW5qp7ihLeC0krrsM8Y8RlUSAzkzjHQF+5skuE=; b=HIhFpGKtA1T0RG ziIrYA3OGdyGnIjKee6Zbdu+w82n8RJHFUa/GcJos9WaWkkfmfb6UhrqvjFoMqi1tnHQUD02FTBwI keyia0W2i067UpOTocJTQiI2R3rRS5Nhj57EiBoDxypJhQnwavKWOE4sSI9TUEOS3x/YrhFSHXEUo RMI7nWm9BnXzH+0sBicYoguPW5zpgZdoflftZiv87OQ+Tn9w0S1VKNnloZASIs4g2CGPL5l+EPamR 7jbPkkVZ606nYzyzb88GQRohX3K6WvD8HV1tMga0KMXKaj5obxNq+pUwBguDwNB2D7VK+1EbnhOYv G6uFvO4zqUSpt7i3vdsg==; 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 1gHlvE-0006uR-Jx; Wed, 31 Oct 2018 08:32:16 +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 1gHlvB-0006re-5r for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2018 08:32:14 +0000 Received: by mail-lf1-f65.google.com with SMTP id d7-v6so10970549lfi.2 for ; Wed, 31 Oct 2018 01:32:02 -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=yodtWAaw5BTk3hbCqBw9o101omzQN2QDRD/joFnNkiA=; b=EO4jZ4eGbpnTHfykqkf21MHZmChsKXSXlxvFjhD80DyqnupLYt2/brZ8gHrmhChv2D HKN3NgpqMPXbUXa5vD/RLs1cmgzDOdHw52CWwwnfsNqpItofE4rktnOiwIjmWWv5uQMV wVQZHKrqll02W7PqrQMYzUZdcgdZgSrLCdfTawH6azFzrJJ51eHQ9M1NaOjd5zMgLmch 757bYKYF3DT2jGIgLQxxa1H3SrNnOSjjshtaorBwhV5fxkUMJk7hHhq0iwJmwILpnCJ/ dYLIYojlJ4DpfmQjQ2scWcIgFgf0++8tc3puMK47Ub8C01OYOWKvsfYt/nPQSL4gFR5g ZCCA== X-Gm-Message-State: AGRZ1gLnhUtVoW1h2ap7dzqwhXOr8t+A+W9yF36c389h+w7LbwPES37/ CqE6/4wHiusyNw2P/OaN7pQ= X-Google-Smtp-Source: AJdET5d+965pcpjHNMils5+JMBG9Pp5AZoQQ91OgfhYTK3gWlr+tcNeXjqkB7PPrVZmkJtWKUL/cgw== X-Received: by 2002:a19:f115:: with SMTP id p21mr1220273lfh.20.1540974721284; Wed, 31 Oct 2018 01:32:01 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id f134-v6sm1822585lfg.68.2018.10.31.01.31.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 01:32:00 -0700 (PDT) Date: Wed, 31 Oct 2018 10:31:48 +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 3/8] clk: clk-s3c2410-dclk: clean up clkdev lookup leak 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_013213_306356_3E43E94E X-CRM114-Status: GOOD ( 14.11 ) 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 variant of clkdev lookup registration in order to avoid clkdev lookup leak at device remove. Signed-off-by: Matti Vaittinen --- drivers/clk/samsung/clk-s3c2410-dclk.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c index 0d92f3e5e3d9..07798debfec4 100644 --- a/drivers/clk/samsung/clk-s3c2410-dclk.c +++ b/drivers/clk/samsung/clk-s3c2410-dclk.c @@ -309,16 +309,17 @@ static int s3c24xx_dclk_probe(struct platform_device *pdev) goto err_clk_register; } - ret = clk_hw_register_clkdev(clk_table[MUX_DCLK0], "dclk0", NULL); + ret = devm_clk_hw_register_clkdev(&pdev->dev, clk_table[MUX_DCLK0], + "dclk0", NULL); if (!ret) - ret = clk_hw_register_clkdev(clk_table[MUX_DCLK1], "dclk1", - NULL); + ret = devm_clk_hw_register_clkdev(&pdev->dev, + clk_table[MUX_DCLK1], "dclk1", NULL); if (!ret) - ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT0], - "clkout0", NULL); + ret = devm_clk_hw_register_clkdev(&pdev->dev, + clk_table[MUX_CLKOUT0], "clkout0", NULL); if (!ret) - ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT1], - "clkout1", NULL); + ret = devm_clk_hw_register_clkdev(&pdev->dev, + clk_table[MUX_CLKOUT1], "clkout1", NULL); if (ret) { dev_err(&pdev->dev, "failed to register aliases, %d\n", ret); goto err_clk_register;