linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Archit Taneja <architt@codeaurora.org>,
	David Airlie <airlied@linux.ie>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Hai Li <hali@codeaurora.org>, Rob Herring <robh@kernel.org>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	freedreno@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch v2] drm/msm/dsi: free first element on error
Date: Thu, 16 Feb 2017 07:16:27 -0500	[thread overview]
Message-ID: <CAF6AEGuaYjRQCpLxade_Htm6tS8Zvy6JQG8dRt973C-aaPCP5g@mail.gmail.com> (raw)
In-Reply-To: <20170216120028.GA29698@mwanda>

On Thu, Feb 16, 2017 at 7:00 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We're off by one here.  We free something that wasn't allocated and we
> don't free msm_host->bus_clks[].
>
> Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks

Reviewed-by: Rob Clark <robdclark@gmail.com>

>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 1fc07ce24686..4fa32296162e 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -437,7 +437,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host)
>
>         return 0;
>  err:
> -       for (; i > 0; i--)
> +       while (i--)
>                 clk_disable_unprepare(msm_host->bus_clks[i]);
>
>         return ret;

  reply	other threads:[~2017-02-16 12:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 10:50 [patch] drm/msm/dsi: free first element on error Dan Carpenter
2017-02-16 11:27 ` Jani Nikula
     [not found]   ` <87a89mnznw.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-16 11:53     ` Dan Carpenter
2017-02-16 12:03       ` walter harms
2017-02-16 12:15         ` Rob Clark
2017-02-16 12:25         ` Jani Nikula
2017-02-16 12:00   ` [patch v2] " Dan Carpenter
2017-02-16 12:16     ` Rob Clark [this message]
2017-02-16 12:27       ` Jani Nikula
2017-02-26 20:52         ` Daniel Vetter
2017-02-27 10:18           ` Jani Nikula
     [not found]             ` <87h93ggcnn.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-27 10:25               ` Daniel Vetter
     [not found]                 ` <CAKMK7uGLn3m8eEzYEmPFDPr090B0Cq9Xycg_bJdX7SkRJYtNyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-27 11:25                   ` Rob Clark

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=CAF6AEGuaYjRQCpLxade_Htm6tS8Zvy6JQG8dRt973C-aaPCP5g@mail.gmail.com \
    --to=robdclark@gmail.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hali@codeaurora.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).