Re: [PATCH v2] thermal: cpu_cooling: Remove usage of devm functions

Viresh Kumar
2015-08-26T12:52:04Z

On 26-08-15, 13:47, Javi Merino wrote:
> I missed this because I wasn't CCed :( Thankfully, I'll be in
> MAINTAINERS for this soon.

Yeah, I need to resend that patch soon :)

> > - devm_kfree(&cdev->device, load_cpu);
>
> This introduces a memory leak. Keep the kfree() here, you can't drop
> it. Cheers,
> Javi
>
> > - }
> > -
> > *power = static_power + dynamic_power;
> > return 0;
> > +
> > +free:
> > + kfree(load_cpu);

Wouldn't this make that work ?

--
viresh