Messages in this thread | | | Date | Thu, 19 Jan 2023 10:46:25 +0530 | From | Viresh Kumar <> | Subject | Re: [PATCH V4 1/3] thermal: core: call put_device() only after device_register() fails |
| |
On 18-01-23, 20:58, Rafael J. Wysocki wrote: > On Wed, Jan 18, 2023 at 9:38 AM Viresh Kumar <viresh.kumar@linaro.org> wrote: > > > > put_device() shouldn't be called before a prior call to > > device_register(). __thermal_cooling_device_register() doesn't follow > > that properly and needs fixing. Also > > thermal_cooling_device_destroy_sysfs() is getting called unnecessarily > > on few error paths. > > > > Fix all this by placing the calls at the right place. > > > > Based on initial work done by Caleb Connolly. > > > > Fixes: 4748f9687caa ("thermal: core: fix some possible name leaks in error paths") > > Fixes: c408b3d1d9bb ("thermal: Validate new state in cur_state_store()") > > Reported-by: Caleb Connolly <caleb.connolly@linaro.org> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > > OK, so I think that this patch is needed for 6.2 and the other two may > be queued up for later (they do depend on this one, though, of > course). Is my understanding correct?
Right.
-- viresh
| |