]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
gpio: zynq: Do not check unsigned type that is >= 0
authorMichal Simek <michal.simek@xilinx.com>
Wed, 13 Jun 2018 07:05:51 +0000 (09:05 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 14 Jun 2018 07:01:41 +0000 (09:01 +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

index 4cb75a862780e7dfed03cd90ba198a4a25e1fbb2..804ddbd4983b7eb47d56b2889174b277f8889c26 100644 (file)
@@ -189,7 +189,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)