Re: [PATCH v1 1/2] gpiolib: Replace open coded krealloc()

From: Linus Walleij
Date: Thu Mar 23 2023 - 04:17:24 EST


On Tue, Mar 21, 2023 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> gpiod_get_array() does a new allocation in some cases, followed
> by copying previously allocated placeholder for the descriptors.
>
> Replace that with krealloc(__GFP_ZERO), since it was kzalloc()
> originally.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Wow that's a really nice patch!
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij