From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srinivas Kandagatla Subject: Re: [PATCH 1/3] drm/msm: dsi host: add missing of_node_put() Date: Mon, 22 Jun 2015 17:00:27 +0100 Message-ID: <5588311B.6030806@linaro.org> References: <1434984861-22948-1-git-send-email-architt@codeaurora.org> <1434984861-22948-2-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434984861-22948-2-git-send-email-architt@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org To: Archit Taneja , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: robdclark@gmail.com, hali@codeaurora.org, linux-kernel@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org On 22/06/15 15:54, Archit Taneja wrote: > 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 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index de04009..1751659 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -1582,6 +1582,8 @@ 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) { > + of_node_put(node); > + Atleast from the current state of code, It looks like the driver is going to refer to the node of_node_put?, So I think this is not the right place to have of_node_put. > if (!of_drm_find_panel(node)) > return -EPROBE_DEFER; > } >