Skip to contentSkip to conversation

driver: input: twl4030-vibra: fix missing of_node_put

PATCH In review Libo Chen 2 participants 2 messages Aug 31, 2013 – Sep 1, 2013

Subsystems (2)
lore
Share & tools
lore

Libo Chen

author
#0 lore raw

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

decrease node device_node refcount after task completion

---
 drivers/input/misc/twl4030-vibra.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/misc/twl4030-vibra.c +3 -1
index 68a5f33..b8d1526 100644
@@ -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;
 }
Signature · 1 line
1.7.1
Acked-by on v1 2/3
#1 lore raw
Quoted 4 lines · Libo Chen

decrease node device_node refcount after task completion

Quoted 21 lines
---
 drivers/input/misc/twl4030-vibra.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/misc/twl4030-vibra.c +3 -1
index 68a5f33..b8d1526 100644
@@ -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;
 }
Signature · 5 lines
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html