linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Johan Hovold <johan@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Marek Belisko <marek@goldelico.com>
Subject: Re: [PATCH 1/3] Input: twl4030-vibra: fix sibling-node lookup
Date: Mon, 13 Nov 2017 09:17:09 +0200	[thread overview]
Message-ID: <2f1d38a1-2646-1c9a-ccb7-62f8a62ca110@ti.com> (raw)
In-Reply-To: <20171111154339.16875-1-johan@kernel.org>



On 2017-11-11 17:43, Johan Hovold wrote:
> A helper purported to look up a child node based on its name was using
> the wrong of-helper and ended up prematurely freeing the parent of-node
> while searching the whole device tree depth-first starting at the parent
> node.
> 
> Fixes: 64b9e4d803b1 ("input: twl4030-vibra: Support for DT booted kernel")
> Fixes: e661d0a04462 ("Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning")
> Cc: stable <stable@vger.kernel.org>     # 3.7
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: Marek Belisko <marek@goldelico.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  drivers/input/misc/twl4030-vibra.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
> index 6c51d404874b..c37aea9ac272 100644
> --- a/drivers/input/misc/twl4030-vibra.c
> +++ b/drivers/input/misc/twl4030-vibra.c
> @@ -178,12 +178,14 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
>  			 twl4030_vibra_suspend, twl4030_vibra_resume);
>  
>  static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
> -			      struct device_node *node)
> +			      struct device_node *parent)
>  {
> +	struct device_node *node;
> +
>  	if (pdata && pdata->coexist)
>  		return true;
>  
> -	node = of_find_node_by_name(node, "codec");
> +	node = of_get_child_by_name(parent, "codec");
>  	if (node) {
>  		of_node_put(node);
>  		return true;
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  parent reply	other threads:[~2017-11-13  7:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11 15:43 [PATCH 1/3] Input: twl4030-vibra: fix sibling-node lookup Johan Hovold
2017-11-11 15:43 ` [PATCH 2/3] Input: twl6040-vibra: fix child-node lookup Johan Hovold
2017-11-13  7:17   ` Peter Ujfalusi
     [not found]   ` <91A591C4-D6BD-462D-B81E-224DB268EDDB@goldelico.com>
2017-11-13  9:16     ` Johan Hovold
2017-11-13 14:10   ` Peter Ujfalusi
2017-11-13 14:19     ` Johan Hovold
2017-11-13 14:39       ` H. Nikolaus Schaller
2017-11-13 14:46         ` Johan Hovold
2018-01-09  1:35   ` Dmitry Torokhov
2017-11-11 15:43 ` [PATCH 3/3] Input: 88pm860x-ts: " Johan Hovold
2018-01-09  1:35   ` Dmitry Torokhov
2017-11-11 17:50 ` [PATCH 1/3] Input: twl4030-vibra: fix sibling-node lookup Dmitry Torokhov
2017-11-12 12:12   ` Johan Hovold
2017-11-13  9:11     ` Lee Jones
2017-11-13  9:35       ` Johan Hovold
2017-11-13 10:20         ` Lee Jones
2017-11-13 11:51           ` Johan Hovold
2017-11-13 21:54             ` Dmitry Torokhov
2017-11-14 10:39               ` Lee Jones
2017-11-13  7:17 ` Peter Ujfalusi [this message]
2017-12-11 10:21 ` Johan Hovold
2018-01-08 13:55   ` Johan Hovold
2018-01-09  1:36     ` Dmitry Torokhov
2018-01-09  9:21       ` Johan Hovold
2018-01-09  1:17 ` Dmitry Torokhov
2018-01-09  1:35 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f1d38a1-2646-1c9a-ccb7-62f8a62ca110@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).