Re: [PATCH 2/2] gpio: make gpiod_is_equal() arguments stricter

From: Linus Walleij
Date: Tue Jun 24 2025 - 15:26:06 EST


On Fri, Jun 20, 2025 at 2:58 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> It makes no sense for a GPIO descriptor comparator to return true when
> the arguments passed to it are NULL or IS_ERR(). Let's validate both and
> return false unless both are valid GPIO descriptors.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> Link: https://lore.kernel.org/all/Z_aFBfjb17JxOwyk@xxxxxxxxxxxxxxxxxx/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij