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>
This commit is contained in:
Michal Simek 2018-06-13 09:05:51 +02:00
parent 1a7414f626
commit 1471fadf69

View File

@ -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)