Received: by 10.223.164.202 with SMTP id h10csp2962763wrb; Sun, 12 Nov 2017 23:18:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1UbUw53ZvmtcivYqQAOWm2Ng2H1QRYSUH8AGvjuhOCl5ml+pYKJjO/hX3WlZPZFPqbNaq X-Received: by 10.101.97.197 with SMTP id j5mr7811448pgv.205.1510557535603; Sun, 12 Nov 2017 23:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510557535; cv=none; d=google.com; s=arc-20160816; b=niyuzQEPELJjyX9HuRm8nG55Oj7TxMM+R5YZqts2fv7Jz7FUQ0bxnEscNyKzlLeSL1 z0CBHzrKDHWsMep1QAEBJJvyoohuqYxOfzKKDPezjRaTq7GrVWWYpvFGKkLK7LtEeuaC MdjqHiJ1cc4Nwq7g420xm6zrvJvDNFmZQ9WmoUrUcIDJ63dOzudUKVnvejN7qF/09cd1 JtGvDsUNqbNAIPhpKPZQBH2i1A829YGKmT0a3qHyqKNUYhEIYpncc0E1tr883fxqA9cX NM+Gi4UWfKCXDfP0vb15ZCMSh3RL+kZkngzr9thIxeJoCGIrlIS56TtbE6gmuvjbz1kb LB6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=8mOcOxe3eLc6TFWsIGx2VN0MwCsstr8vHHngJXnkSmY=; b=s+jStuFRPK/jUrnnR5HxjFTi4EdMgyKPq28vPh7A+E6SEiq9CihbsMg7909QwYVW2B f/4Nl05ab4P9YS6OyMtbakWEnQfTqor0xi9lwEImjGDaO8/MfKJedqn8Xk1NJtrOa2g+ ikTx0+CNRdcQaM7cymXuPIicUOruDzuDUiurcqqL3OhiOOm84bvAPRU2mXWrr8jnQIIh IqbKg5ed5ZQlRuHX5cqcWiEf2VtLEjROKrk/kp6a2DClGflsPL/PNha7gFCRRfGJidCw NmaFZ/7dDUvaSBtXR58y4FWlY5vhtItwr1VW8GrYnEFcgGbNX4orZalMgAVdqnXeqUbe DbBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BlnJmrq9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t73si14748635pfk.319.2017.11.12.23.18.42; Sun, 12 Nov 2017 23:18:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BlnJmrq9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752015AbdKMHRq (ORCPT + 89 others); Mon, 13 Nov 2017 02:17:46 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:39375 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbdKMHRm (ORCPT ); Mon, 13 Nov 2017 02:17:42 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id vAD7GoIa024433; Mon, 13 Nov 2017 01:16:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1510557410; bh=w1o4hqiL4SfSwoys1TjPEi0AwLiPjZPhXr8PrJ/Owu4=; h=Subject:To:References:CC:From:Date:In-Reply-To; b=BlnJmrq91C2ToukuxKiQ7Y8uLt6ZuDgs5fMflpVFD6yfH8RT6T9saLn1Jbmh0pylP GOPKrqroRlGoXqgRJVcLU8GGYOOVwL4ediSN4OV5CzbU+G1HIulQ+8OVZLQlj31wRw QRq7vz3rn9yZ4pB1Dnl/1kGAU3hmnurcmG4Rnigo= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAD7Gj0L022496; Mon, 13 Nov 2017 01:16:45 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 13 Nov 2017 01:16:45 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 13 Nov 2017 01:16:45 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAD7GgHk012403; Mon, 13 Nov 2017 01:16:43 -0600 Subject: Re: [PATCH 2/3] Input: twl6040-vibra: fix child-node lookup To: Johan Hovold , Dmitry Torokhov References: <20171111154339.16875-1-johan@kernel.org> <20171111154339.16875-2-johan@kernel.org> CC: , , stable , "H . Nikolaus Schaller" From: Peter Ujfalusi Message-ID: Date: Mon, 13 Nov 2017 09:17:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171111154339.16875-2-johan@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-11 17:43, Johan Hovold wrote: > 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. > > Later sanity checks on node properties (which would likely be missing) > should prevent this from causing much trouble however, especially as the > original premature free of the parent node has already been fixed > separately (but that "fix" was apparently never backported to stable). > > Fixes: e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") > Fixes: c52c545ead97 ("Input: twl6040-vibra - fix DT node memory management") > Cc: stable # 3.6 > Cc: Peter Ujfalusi > Cc: H. Nikolaus Schaller > Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi > --- > drivers/input/misc/twl6040-vibra.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c > index 5690eb7ff954..15e0d352c4cc 100644 > --- a/drivers/input/misc/twl6040-vibra.c > +++ b/drivers/input/misc/twl6040-vibra.c > @@ -248,8 +248,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev) > int vddvibr_uV = 0; > int error; > > - of_node_get(twl6040_core_dev->of_node); > - twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node, > + twl6040_core_node = of_get_child_by_name(twl6040_core_dev->of_node, > "vibra"); > if (!twl6040_core_node) { > dev_err(&pdev->dev, "parent of node is missing?\n"); > - P�ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki From 1583785007086064291@xxx Sat Nov 11 15:44:43 +0000 2017 X-GM-THRID: 1583785007086064291 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread