Re: [PATCH] cpufreq: sparc: Fix exception handling in two functions

From: Viresh Kumar
Date: Mon Apr 03 2023 - 19:04:40 EST


On 03-04-23, 14:50, Markus Elfring wrote:
> >> +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c
> >> @@ -324,12 +324,12 @@ static int __init us2e_freq_init(void)
> >> ret = -ENOMEM;
> >> driver = kzalloc(sizeof(*driver), GFP_KERNEL);
> >> if (!driver)
> >> - goto err_out;
> >> + goto reset_freq_table;
> >
> > I would just return error from here.
>
> I got the impression from this function implementation that a bit of additional
> resource release would be relevant so far (at the end of a corresponding if branch).

That is exactly what you are looking to fix, so lets fix it once and
for all.

--
viresh