All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, srinivas.kandagatla@linaro.org
Subject: [PATCH v2 1/3] drm/msm: dsi host: add missing of_node_put()
Date: Fri, 26 Jun 2015 13:13:03 +0530	[thread overview]
Message-ID: <1435304585-4451-2-git-send-email-architt@codeaurora.org> (raw)
In-Reply-To: <1435304585-4451-1-git-send-email-architt@codeaurora.org>

Decrement device node refcount if of_get_child_by_name is successfully
called.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
---
 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 984f9ef..5c3e82d 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1586,8 +1586,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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-06-26  7:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  7:43 [PATCH v2 0/3] drm/msm: Use device graph to parse connected panels Archit Taneja
2015-06-26  7:43 ` Archit Taneja [this message]
2015-06-26  7:43 ` [PATCH v2 2/3] drm/msm: dsi host: Use device graph parsing to parse connected panel Archit Taneja
2015-06-26  7:43 ` [PATCH v2 3/3] drm/msm: mdp4 lvds: get panel node via of graph parsing Archit Taneja
2015-08-02 16:18 ` [PATCH v3 0/3] drm/msm: Use device graph to parse connected panels Archit Taneja
2015-08-02 16:18   ` [PATCH v3 1/3] drm/msm: dsi host: add missing of_node_put() Archit Taneja
2015-08-02 16:18   ` [PATCH v3 2/3] drm/msm: dsi host: Use device graph parsing to parse connected panel Archit Taneja
2015-08-02 16:18   ` [PATCH v3 3/3] drm/msm: mdp4 lvds: get panel node via of graph parsing Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435304585-4451-2-git-send-email-architt@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.