mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Cc: "Navid Emamdoost" <emamd001@umn.edu>, "Kangjie Lu" <kjlu@umn.edu>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>,
	"Johan Hovold" <johan@kernel.org>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clocksource/drivers: Fix something in ttc_setup_clockevent and ttc_setup_clocksource
Date: Mon, 23 Dec 2019 13:43:34 +0100	[thread overview]
Message-ID: <7c19ab65-9d11-0e5b-ab53-b4e968d1ae95@web.de> (raw)
In-Reply-To: <20191220000923.9924-1-navid.emamdoost@gmail.com>

> In the implementation of ttc_setup_clockevent() and
> ttc_setup_clocksource(), the allocated memory for ttccs is leaked when
> clk_notifier_register() fails.

I suggest to correct your commit message.


> Use goto to direct the execution into error handling path.

* Should the desired completion of the exception handling be described
  by an other wording?

* Will it be better to improve the affected functions by
  separate update steps?

* How do you think about to add the tag “Reported-by” for Michal Simek?
  https://lore.kernel.org/linux-arm-kernel/2a6cdb63-397b-280a-7379-740e8f43ddf6@xilinx.com/> +++ b/drivers/clocksource/timer-cadence-ttc.c
> @@ -363,16 +363,20 @@  static int __init ttc_setup_clocksource(struct clk *clk, void __iomem *base,
>  	return 0;
> +
> +release_ttcce:
> +
> +	kfree(ttcce);
> +	return err;
…

* Please omit a blank line after the label.

* Is there a need to call the function “clk_disable_unprepare”
  by another jump target?

Regards,
Markus

      parent reply	other threads:[~2019-12-23 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  0:09 [PATCH] clocksource/drivers: Fix memory leaks " Navid Emamdoost
2019-12-20  5:10 ` Johan Hovold
2019-12-20  8:37   ` Michal Simek
2019-12-23 12:43 ` Markus Elfring [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=7c19ab65-9d11-0e5b-ab53-b4e968d1ae95@web.de \
    --to=markus.elfring@web.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=emamd001@umn.edu \
    --cc=johan@kernel.org \
    --cc=kjlu@umn.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=navid.emamdoost@gmail.com \
    --cc=soren.brinkmann@xilinx.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome