summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-06-13 09:05:51 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-06-15 08:54:04 +0200
commit1471fadf69493141e990b078d8b8a3b215008f31 (patch)
tree9f7472fcca2aee19353fde4da8a69cc193ba16d9 /drivers/gpio
parent1a7414f6268060c56c72fd7559782137cc953c96 (diff)
gpio: zynq: Do not check unsigned type that is >= 0
There is no reason to check that unsigned type that is >= 0. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/zynq_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index 9663294685..442ba196ca 100644
--- 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)