Re: [PATCH v4 0/8] iio: light: opt3001: driver cleanup

From: Joshua Crofts

Date: Mon May 25 2026 - 06:39:20 EST


On Mon, 25 May 2026 at 10:20, Joshua Crofts via B4 Relay
<devnull+joshua.crofts1.gmail.com@xxxxxxxxxx> wrote:
>
> This series deals with cleaning up the TI OPT3001 sensor driver,
> moving it to more modern kernel practices and improving the code style.
>
> While reviewing, Jonathan Cameron (and eventually Sashiko) found a race
> condition where userspace could start interacting with the device
> before the hardware IRQ was set up.
>
> Changes include:
> - moving the driver to use devm_* functions
> - IWYU cleanups
> - removal of unnecessary macros and comments
> - using dev_err_probe() in probe and probe path functions
> - checkpatch.pl warning cleanups
> - fixing a race condition found in opt3001_probe() function
>
> Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> ---

Sashiko came back with a dead code one liner and then found
a new issue where a function returns instead of calling cleanup
functions. This is definitely a bug that should be marked for stable.

--
Kind regards

CJD