linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Fix error handling paths of all basic clock register() routines
Date: Tue, 1 May 2012 15:48:32 -0700	[thread overview]
Message-ID: <20120501224832.GB17311@gmail.com> (raw)
In-Reply-To: <c65c7006185c193706b401b874b59e3769f593b0.1334029502.git.viresh.kumar@st.com>

On 20120410-09:24, Viresh Kumar wrote:
> This fixes following in error handling paths of register() routines of all basic
> clock types:
> - Free memory for clock type, allocated with kmalloc or kzalloc if
>   clk_register() fails.
> - No, need to free memory for clock type, if allocation fails for it.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
>  drivers/clk/clk-divider.c      |    2 +-
>  drivers/clk/clk-fixed-factor.c |    2 +-
>  drivers/clk/clk-fixed-rate.c   |   25 ++++++++++++++++++++-----
>  drivers/clk/clk-gate.c         |    2 +-
>  drivers/clk/clk-mux.c          |    8 +++++++-
>  5 files changed, 30 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index d5ac6a7..68158ce 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -192,8 +192,8 @@ struct clk *clk_register_divider(struct device *dev, const char *name,
>  	if (clk)
>  		return clk;
>  
> -out:
>  	kfree(div->parent[0]);
> +out:
>  	kfree(div);
>  
>  	return NULL;

Hi Viresh,

My apologies for taking so long to get back to you on this.  This patch
completely fell through the cracks.

Anyways my clk-next branch refactored this code and does The Right Thing
now, so I won't be taking this patch.

Thanks,
Mike

  reply	other threads:[~2012-05-01 22:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10  3:54 [PATCH] clk: Fix error handling paths of all basic clock register() routines Viresh Kumar
2012-05-01 22:48 ` Mike Turquette [this message]
2012-05-02  3:25   ` Viresh Kumar

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=20120501224832.GB17311@gmail.com \
    --to=mturquette@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).