On Tue, Mar 21, 2023 at 2:53 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > gpiod_get_array() has a long if-else-if branching where each of them > tests for the same variable to be not NULL. Instead, check for NULL > before even going to that flow. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> It's way more readable like this. Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij