diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index dd22ea19c3ed..71728d6e0bca 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -80,7 +80,7 @@ static int ep93xx_gpio_port(struct gpio_chip *gc) port++; /* This should not happen but is there as a last safeguard */ - if (gc != &epg->gc[port]) { + if (port == ARRAY_SIZE(epg->gc)) { pr_crit("can't find the GPIO port\n"); return 0; }