Re: [PATCH v3 5/7] iio: light: opt3001: prefer dev_err_probe()

From: Joshua Crofts

Date: Fri May 22 2026 - 01:07:28 EST


On Fri, 22 May 2026 at 03:49, Maxwell Doose <m32285159@xxxxxxxxx> wrote:
> Ah, but all of the above don't seem like _probe() functions. I'm not
> an expert on dev_err_probe() but I'm pretty sure it's only for use (or
> at least, designed for use) in _probe() functions. Only function where
> I know it's 100% fine in is the one below.

Hi Max,

Actually if you have any functions that are *only* called in _probe(), then
it is okay to move them to dev_err_probe(), you just have to ensure
you're not calling dev_err_probe() twice - once in the function and
once at the call site.

--
Kind regards

CJD