diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpiolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 530b1ba984a4..c788b55dfe85 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3122,10 +3122,10 @@ static int dt_gpio_count(struct device *dev, const char *con_id) gpio_suffixes[i]); ret = of_gpio_named_count(dev->of_node, propname); - if (ret >= 0) + if (ret > 0) break; } - return ret; + return ret ? ret : -ENOENT; } static int platform_gpio_count(struct device *dev, const char *con_id) |