lkml.org 
[lkml]   [2019]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: remove explicit comparison with 0
On Sat, Sep 7, 2019 at 6:39 PM Saiyam Doshi <saiyamdoshi.in@gmail.com> wrote:

> No need to compare return value with 0. In case of non-zero
> return value, the if condition will be true.
>
> This makes intent a bit more clear to the reader.
> "if (x) then", compared to "if (x is not zero) then".
>
> Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com>

Patch applied.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2019-09-12 01:06    [W:0.030 / U:5.912 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site