diff mbox

[2/3] driver: input: twl4030-vibra: fix missing of_node_put

Message ID 522190ED.6020909@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Libo Chen Aug. 31, 2013, 6:45 a.m. UTC
decrease node device_node refcount after task completion

Signed-off-by: Libo Chen <libo.chen@huawei.com>
---
 drivers/input/misc/twl4030-vibra.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Peter Ujfalusi Sept. 1, 2013, 5:01 p.m. UTC | #1
On 08/31/2013 09:45 AM, Libo Chen wrote:
> 
> decrease node device_node refcount after task completion
> 
> Signed-off-by: Libo Chen <libo.chen@huawei.com>

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

> ---
>  drivers/input/misc/twl4030-vibra.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
> index 68a5f33..b8d1526 100644
> --- a/drivers/input/misc/twl4030-vibra.c
> +++ b/drivers/input/misc/twl4030-vibra.c
> @@ -185,8 +185,10 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
>  	if (pdata && pdata->coexist)
>  		return true;
> 
> -	if (of_find_node_by_name(node, "codec"))
> +	if (of_find_node_by_name(node, "codec")) {
> +		of_node_put(node);
>  		return true;
> +	}
> 
>  	return false;
>  }
>
diff mbox

Patch

diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 68a5f33..b8d1526 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -185,8 +185,10 @@  static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
 	if (pdata && pdata->coexist)
 		return true;

-	if (of_find_node_by_name(node, "codec"))
+	if (of_find_node_by_name(node, "codec")) {
+		of_node_put(node);
 		return true;
+	}

 	return false;
 }