Re: [PATCH v3 3/5] regcache: flat: Remove unneeded check and error message for -ENOMEM
From: Charles Keepax
Date: Fri Oct 31 2025 - 06:51:51 EST
On Fri, Oct 31, 2025 at 09:03:18AM +0100, Andy Shevchenko wrote:
> There is a convention in the kernel to avoid error messages
> in the cases of -ENOMEM errors. Besides that, the idea behind
> using struct_size() and other macros from overflow.h is
> to saturate the size that the following allocation call will
> definitely fail, hence the check and the error messaging added
> in regcache_flat_init() are redundant. Remove them.
>
> Acked-by: Sander Vanheule <sander@xxxxxxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
Thanks,
Charles