From patchwork Sat Feb 11 23:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9568213 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9AC2260231 for ; Sat, 11 Feb 2017 23:05:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 921D328558 for ; Sat, 11 Feb 2017 23:05:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86A6828575; Sat, 11 Feb 2017 23:05:19 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DE1328558 for ; Sat, 11 Feb 2017 23:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750968AbdBKXFC (ORCPT ); Sat, 11 Feb 2017 18:05:02 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:52131 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750778AbdBKXFA (ORCPT ); Sat, 11 Feb 2017 18:05:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=wCVatIoRqqxwTeyAQ3DZvP++AFMSdSqh+2+sAdxOiHc=; b=k+VYbqggbTo4dZopSubmJuPme0 6TGo9ebs12ffcu154lBy9jmrgSLU3OoQcqu0m5kvK8j1zyG7B/bImf2qdr608W+129mQBgXiAxHkm uc5XM3VfcbMawk1b4XRzaa4ULu2nmbdtMzFMezrMxCewTKQAg0/qoEgrGqbkBPlwGYMdoYZv/Em4G xfj1nMUAnVqF8WOfDipLw5CaHfcW9hpSt7/Qp2HkCbcWwzL6CcS4W43NOSr2Xk8SnfKRACEdqzu+O UZ+TYJOU1YGL2+UFCl0JpMFI2nQz5eqlRNzf6FS2fBL5+MPcc/MT0ZPq8XusrmHCUmRHoaRj1zEwW S3OQ3Xrg==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:55890 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1ccgiw-0031IZ-2B; Sat, 11 Feb 2017 23:04:58 +0000 From: Guenter Roeck To: Andy Gross Cc: David Brown , Michael Turquette , Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Rob Herring Subject: [PATCH] clk: qcom: Do not drop device node twice Date: Sat, 11 Feb 2017 15:04:56 -0800 Message-Id: <1486854296-23156-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP of_find_node_by_name() drops the reference to a passed device node. It is not necessary to drop it again, and doing so may result in the device node being released prematurely. Cc: Rob Herring Signed-off-by: Guenter Roeck --- drivers/clk/qcom/common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index cfab7b400381..03f9d316f969 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -145,7 +145,6 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path, clocks_node = of_find_node_by_path("/clocks"); if (clocks_node) node = of_find_node_by_name(clocks_node, path); - of_node_put(clocks_node); if (!node) { fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);