bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Fri, 1 Jul 2016 09:41:59 +0000 (17:41 +0800)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 8 Aug 2016 13:31:09 +0000 (14:31 +0100)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/bus/vexpress-config.c

index c3cb76b363c63c54d67343dacf4c9ec20032a95f..9efdf1de4035e226825c8435f72f07e8055584d2 100644 (file)
@@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
 
        parent = class_find_device(vexpress_config_class, NULL, bridge,
                        vexpress_config_node_match);
+       of_node_put(bridge);
        if (WARN_ON(!parent))
                return -ENODEV;