Input: twl4030-vibra - add missing of_node_put
authorLibo Chen <clbchenlibo.chen@huawei.com>
Sat, 4 Jan 2014 07:58:32 +0000 (23:58 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 4 Jan 2014 08:47:36 +0000 (00:47 -0800)
We should drop reference to twl6040_core_node device_node once we are done
using it.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/twl4030-vibra.c

index d993775a7c3908513698208b499bc51494ea2094..960ef2a709100836eb1dc752d89e4743f3afae89 100644 (file)
@@ -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;
 }