summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/i2c-gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 4ed9e9e7cd..c1fc290bd2 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -339,7 +339,7 @@ static int i2c_gpio_of_to_plat(struct udevice *dev)
/* "gpios" is deprecated and replaced by "sda-gpios" + "scl-gpios". */
ret = gpio_request_list_by_name(dev, "gpios", bus->gpios,
ARRAY_SIZE(bus->gpios), 0);
- if (ret == -ENOENT) {
+ if (ret == 0) {
ret = gpio_request_by_name(dev, "sda-gpios", 0,
&bus->gpios[PIN_SDA], 0);
if (ret < 0)