Re: [PATCH v2 1/3] err.h: add INIT_ERR_PTR macro
From: Andy Shevchenko
Date: Fri Oct 31 2025 - 09:23:20 EST
On Fri, Oct 31, 2025 at 02:08:32PM +0100, Christian Marangi wrote:
> Add INIT_ERR_PTR macro to initialize static variables with error
INIT_ERR_PTR()
> pointers. This might be useful for specific case where there is a static
> variable initialized to an error condition and then later set to the
> real handle once probe finish/completes.
>
> This is to handle compilation problems like:
>
> error: initializer element is not constant
>
> where ERR_PTR can't be used.
ERR_PTR()
In case you need a new version, please address the above.
Anyways, LGTM now,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
--
With Best Regards,
Andy Shevchenko