From patchwork Sat Nov 11 16:29:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10054425 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 D327D60632 for ; Sat, 11 Nov 2017 16:29:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CB4C2992E for ; Sat, 11 Nov 2017 16:29:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 917FC29A40; Sat, 11 Nov 2017 16:29:40 +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=unavailable 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 515BF2992E for ; Sat, 11 Nov 2017 16:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbdKKQ3h (ORCPT ); Sat, 11 Nov 2017 11:29:37 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:48413 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbdKKQ3d (ORCPT ); Sat, 11 Nov 2017 11:29:33 -0500 Received: by mail-lf0-f65.google.com with SMTP id r135so14142850lfe.5; Sat, 11 Nov 2017 08:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pkVV5mDe6H+KDjrwIkkbtY2uBvKt6LYDsHckUAsGiB0=; b=t0UNFdCWW7GeiB4aS5ITEzS2tZV9U9facVViLxvTn1zEQZfLPB8JXfVM3zyQHddZyJ P8MXg+LGBIhHmlkXb4n/Zbspum4cgtSfWXKJaNID28xvNgUDNWxIGp2hQPeB4UheeOhi G3C30VFxGT3Vi7sCrcZVJMww1rPDNIjuaYN8xesxA8DHyOOHo7u0VSU7oWIN4LWkjB4M wb6rLXiDKpy+9ysLuwbnuDIapE/QCYu9g+UUc4hvMkzpNmuYPw9SwXaHux3pO4XJ854O /vNFY+NmOVMZ9l2yTKtwh6oyFUlzniUJjzeKvFwIJR+4poXvtTNlW+Stu5WQtrUnKV8/ ZTUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=pkVV5mDe6H+KDjrwIkkbtY2uBvKt6LYDsHckUAsGiB0=; b=sfqPCw34sXhWN3Yd6nJCyt6BDeXTChINnE6mH+1XMa72Po8NMID3yHT57KusUusgAY g38cR/qeKmptvN1cx0Y3/rQ9lqL8Degtd6BwB54K6IRZQIjUwJywDOUiVaTQBhpQ1nLX i1cXFpuUo9qjXxx2tB34j3jk/a0YfHeW3T9cqXTrrUP5oJ2feNmADikAW2swyBkRrgjm 26hexTViLHUckobmlgO2z9yg46J2xJ1Zd4+6imiDMJEv7e3tT0Y2YK5/Ad4NnzGqb9ki GC3iR5Bg03oFn84nkpXlnH9B6ziaIegqviwQwxkf1QM0Sj5sIBTE6shVRvxHd+L5mMfI zEiw== X-Gm-Message-State: AJaThX5DLVZm6bJ3Y0C5LbfA27+2uwuTWTfXiKw4lL/yma37sVySNZ25 D3BDRAcQIyp9ul0d53fkCmM= X-Google-Smtp-Source: AGs4zMb8To8yBBSTHCMm4hl1ASjwBJn68RH9kX1RCVbQ2xwWKu2PGn76t11smxyeEvD+xf3FtGvvEg== X-Received: by 10.46.21.91 with SMTP id 27mr1507123ljv.27.1510417771588; Sat, 11 Nov 2017 08:29:31 -0800 (PST) Received: from xi.terra (c-c0bae655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.186.192]) by smtp.gmail.com with ESMTPSA id k37sm2120945lfi.27.2017.11.11.08.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 08:29:30 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1eDYf1-00033q-U4; Sat, 11 Nov 2017 17:29:35 +0100 From: Johan Hovold To: Stephen Boyd Cc: Andy Gross , David Brown , Michael Turquette , Tero Kristo , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable , Peter Ujfalusi Subject: [PATCH 2/2] clk: ti: dra7-atl-clock: fix child-node lookups Date: Sat, 11 Nov 2017 17:29:29 +0100 Message-Id: <20171111162929.11722-2-johan@kernel.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171111162929.11722-1-johan@kernel.org> References: <20171111162929.11722-1-johan@kernel.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix child node-lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. Note that the original premature free of the parent node has already been fixed separately, but that fix was apparently never backported to stable. Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)") Fixes: 660e15519399 ("clk: ti: dra7-atl-clock: Fix of_node reference counting") Cc: stable # 3.16: 660e15519399 Cc: Peter Ujfalusi Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi --- drivers/clk/ti/clk-dra7-atl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c index 13eb04f72389..148815470431 100644 --- a/drivers/clk/ti/clk-dra7-atl.c +++ b/drivers/clk/ti/clk-dra7-atl.c @@ -274,8 +274,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev) /* Get configuration for the ATL instances */ snprintf(prop, sizeof(prop), "atl%u", i); - of_node_get(node); - cfg_node = of_find_node_by_name(node, prop); + cfg_node = of_get_child_by_name(node, prop); if (cfg_node) { ret = of_property_read_u32(cfg_node, "bws", &cdesc->bws);