Re: [PATCH v3 3/3] iio: humidity: hid-sensor-humidity: Use per-instance callbacks
From: Andy Shevchenko
Date: Mon Oct 19 2026 - 06:58:43 EST
On Sun, Oct 18, 2026 at 07:34:20PM -0700, Christopher Hoover wrote:
> hid-sensor-humidity keeps a single static struct
> hid_sensor_hub_callbacks for all instances and overwrites its pdev in
> every probe, so with two humidity sensors, input reports for one are
> delivered with the other's platform device, and a NULL dereference
> follows once that device is removed. The same bug was found in
> hid-sensor-temperature, which shares this code.
>
> Keep the callbacks in struct hid_humidity_state, as the other HID
> sensor drivers (accel, gyro, als, ...) do.
Same comment as per previous patch.
--
With Best Regards,
Andy Shevchenko