drm/fsl-dcu: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Mon, 4 Jul 2016 07:40:40 +0000 (15:40 +0800)
committerStefan Agner <stefan@agner.ch>
Sat, 16 Jul 2016 01:06:28 +0000 (18:06 -0700)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using, but current code only
calls it at error path, fix it by adding it at correct code path.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
drivers/gpu/drm/fsl-dcu/fsl_tcon.c

index bbe34f1c0505f7470b900831636d15e1b8d5ac95..bca09ea24632424f6899ff5c9ac9b4a1017a2300 100644 (file)
@@ -92,6 +92,7 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
                goto err_node_put;
        }
 
+       of_node_put(np);
        clk_prepare_enable(tcon->ipg_clk);
 
        dev_info(dev, "Using TCON in bypass mode\n");