projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a7414f
)
gpio: zynq: Do not check unsigned type that is >= 0
author
Michal Simek
<michal.simek@xilinx.com>
Wed, 13 Jun 2018 07:05:51 +0000
(09:05 +0200)
committer
Michal Simek
<michal.simek@xilinx.com>
Fri, 15 Jun 2018 06:54:04 +0000
(08:54 +0200)
There is no reason to check that unsigned type that is >= 0.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpio/zynq_gpio.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/zynq_gpio.c
b/drivers/gpio/zynq_gpio.c
index 96632946853b6c491cb4176f52c28099126b0f98..442ba196cae000c7f8e82fe9933aa15a918f225c 100644
(file)
--- a/
drivers/gpio/zynq_gpio.c
+++ b/
drivers/gpio/zynq_gpio.c
@@
-188,7
+188,7
@@
static int gpio_is_valid(unsigned gpio, struct udevice *dev)
{
struct zynq_gpio_privdata *priv = dev_get_priv(dev);
- return
(gpio >= 0) && (gpio < priv->p_data->ngpio)
;
+ return
gpio < priv->p_data->ngpio
;
}
static int check_gpio(unsigned gpio, struct udevice *dev)