From 14bb28b0f91f868f081f71eb0c7b590e13527c3c Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Thu, 4 Jun 2015 15:01:57 +0530 Subject: drm/msm: dsi host: add missing of_node_put() Decrement device node refcount if of_get_child_by_name is successfully called. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/msm/dsi') diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index c05a55ec..ef60aef 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1605,8 +1605,12 @@ int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer) node = of_get_child_by_name(msm_host->pdev->dev.of_node, "panel"); if (node) { - if (!of_drm_find_panel(node)) + if (!of_drm_find_panel(node)) { + of_node_put(node); return -EPROBE_DEFER; + } + + of_node_put(node); } } } -- cgit v1.1