Messages in this thread | | | Subject | Re: [PATCH] clocksource/drivers: Fix something in ttc_setup_clockevent and ttc_setup_clocksource | From | Markus Elfring <> | Date | Mon, 23 Dec 2019 13:43:34 +0100 |
| |
> 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
| |