Re: [PATCH v3 0/2] HID: sensor: custom: Fix fields lifetime issues

From: Jiri Kosina

Date: Fri Aug 14 2026 - 10:05:43 EST


On Fri, 7 Aug 2026, Jonathan Cameron wrote:

> > > This series fixes lifetime issues around sensor_inst->fields and the
> > > sysfs attributes that can access it.
> > >
> > > The first patch creates the field attributes before exposing enable_sensor
> > > and removes enable_sensor before freeing the field attributes. This keeps
> > > enable_sensor from accessing power_state and report_state pointers after
> > > the fields array has been freed.
> > >
> > > The second patch fixes the original field sysfs group leak on probe
> > > failure by unwinding any field groups that were created before a later
> > > sysfs_create_group() failure.
> > Series applied to the fixes-togreg branch of iio.git
> >
> Sorry - I wasn't paying attention to what I was picking up.
> These should go via Jiri's tree.
> Dropping them from the iio-fixes tree.

No worries, I've just picked them up.

Thanks,

--
Jiri Kosina
SUSE Labs