summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/input/misc/twl4030-vibra.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/input/misc/twl4030-vibra.c')
-rw-r--r--kernel/drivers/input/misc/twl4030-vibra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/input/misc/twl4030-vibra.c b/kernel/drivers/input/misc/twl4030-vibra.c
index fc17b9592..10c4e3d46 100644
--- a/kernel/drivers/input/misc/twl4030-vibra.c
+++ b/kernel/drivers/input/misc/twl4030-vibra.c
@@ -183,7 +183,8 @@ 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")) {
+ node = of_find_node_by_name(node, "codec");
+ if (node) {
of_node_put(node);
return true;
}