From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: [PATCH v3 1/3] drm/msm: dsi host: add missing of_node_put() Date: Sun, 2 Aug 2015 21:48:22 +0530 Message-ID: <1438532304-23885-2-git-send-email-architt@codeaurora.org> References: <1435304585-4451-1-git-send-email-architt@codeaurora.org> <1438532304-23885-1-git-send-email-architt@codeaurora.org> Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:45578 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbbHBQSg (ORCPT ); Sun, 2 Aug 2015 12:18:36 -0400 In-Reply-To: <1438532304-23885-1-git-send-email-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: dri-devel@lists.freedesktop.org, hali@codeaurora.org Cc: robdclark@gmail.com, linux-arm-msm@vger.kernel.org, srinivas.kandagatla@linaro.org, Archit Taneja Decrement device node refcount if of_get_child_by_name is successfully called. Signed-off-by: Archit Taneja --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index de04009..e2c9610 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1582,8 +1582,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); } } } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation