[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
> 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?

> +++ 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?


 \ /
  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