Skip to content

Commit

Permalink
greenhills: fix the pointless comparison build warning
Browse files Browse the repository at this point in the history
"ioexpander/gpio.c", line 529: warning #186-D: pointless comparison of
          unsigned integer with zero
            if (pintype < GPIO_INPUT_PIN || pintype >= GPIO_NPINTYPES)
                        ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
  • Loading branch information
extinguish authored and pkarashchenko committed Aug 27, 2024
1 parent 2cc9221 commit 599d41d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ioexpander/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)

/* Check if the argument is a valid pintype */

if (pintype < GPIO_INPUT_PIN || pintype >= GPIO_NPINTYPES)
if (pintype >= GPIO_NPINTYPES)
{
ret = -EINVAL;
break;
Expand Down

0 comments on commit 599d41d

Please sign in to comment.