lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Mar 2023 09:18:48 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v1 2/2] gpiolib: Check array_info for NULL only once in gpiod_get_array()

On Tue, Mar 21, 2023 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> 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@...ux.intel.com>

It's way more readable like this.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ