lkml.org 
[lkml]   [2019]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] clocksource/drivers: Fix something in ttc_setup_clockevent and ttc_setup_clocksource
From
Date
> 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

\
 
 \ /
  Last update: 2019-12-23 13:44    [W:0.038 / U:5.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site