Re: [PATCH v6 1/8] iio: light: opt3001: move device registration to end of probe()
From: Andy Shevchenko
Date: Wed Jun 17 2026 - 06:26:51 EST
On Sun, Jun 14, 2026 at 03:19:03PM +0200, Joshua Crofts wrote:
> Move IIO device registration to the end of the probe() function to
> follow standard driver teardown/setup ordering and improve driver
> logic. Additionally, switch devm_iio_device_register() to its
> unmanaged counterpart as current driver implementation mixes managed
> and unmanaged resources, causing potential resource leaks.
>
> Also, add iio_device_unregister() to remove() function to correctly
> handle teardown.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko