All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Archit Taneja <architt@codeaurora.org>
Cc: linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Ilia Mirkin <imirkin@alum.mit.edu>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/msm: Remove bad calls to of_node_put()
Date: Fri, 18 Nov 2016 17:04:56 -0500	[thread overview]
Message-ID: <CAF6AEGv+magjQ7FpkS-JBt0DUg_kL=H2VqhQtHJ0QrLjhi_bBA@mail.gmail.com> (raw)
In-Reply-To: <1479364923-15757-1-git-send-email-architt@codeaurora.org>

On Thu, Nov 17, 2016 at 1:42 AM, Archit Taneja <architt@codeaurora.org> wrote:
> In add_components_mdp, we parse the endpoints in MDP output ports
> using the helper for_each_endpoint_of_node(). Our function calls
> of_node_put() on the endpoint node before we iterate over the
> next one. This is already done by the helper, and results in
> trying to decrement the refcount twice.
>
> Remove the extra of_node_put calls. This fixes warnings seen when
> we try to insert the driver as a module on IFC6410.

thanks.. fwiw, I've also seen this error on at least one of db{410,820}c..

BR,
-R

> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Archit Taneja <architt@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/msm_drv.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 46568fc..5cabe1b 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -903,10 +903,8 @@ static int add_components_mdp(struct device *mdp_dev,
>                  * remote-endpoint isn't a component that we need to add
>                  */
>                 if (of_device_is_compatible(np, "qcom,mdp4") &&
> -                   ep.port == 0) {
> -                       of_node_put(ep_node);
> +                   ep.port == 0)
>                         continue;
> -               }
>
>                 /*
>                  * It's okay if some of the ports don't have a remote endpoint
> @@ -914,15 +912,12 @@ static int add_components_mdp(struct device *mdp_dev,
>                  * any external interface.
>                  */
>                 intf = of_graph_get_remote_port_parent(ep_node);
> -               if (!intf) {
> -                       of_node_put(ep_node);
> +               if (!intf)
>                         continue;
> -               }
>
>                 component_match_add(master_dev, matchptr, compare_of, intf);
>
>                 of_node_put(intf);
> -               of_node_put(ep_node);
>         }
>
>         return 0;
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
>

      reply	other threads:[~2016-11-18 22:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17  6:42 [PATCH] drm/msm: Remove bad calls to of_node_put() Archit Taneja
2016-11-18 22:04 ` Rob Clark [this message]

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='CAF6AEGv+magjQ7FpkS-JBt0DUg_kL=H2VqhQtHJ0QrLjhi_bBA@mail.gmail.com' \
    --to=robdclark@gmail.com \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=linux-arm-msm@vger.kernel.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.