From: Nikita Yushchenko Date: Tue, 15 Feb 2022 18:10:09 +0000 (+0300) Subject: ti: i2c: fix probe_chip() return value X-Git-Tag: v2025.01-rc5-pxa1908~1527^2 X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=a064e0c75fdf63c546a5a0885fa0c58bb1643dac;p=u-boot.git ti: i2c: fix probe_chip() return value Per documentation, dm_i2c_ops.probe_chip() shall return -EREMOTEIO if probe fails. Currently, omap_i2c_probe_chip() returns 1 instead. Fix that. Signed-off-by: Nikita Yushchenko Reviewed-by: Heiko Schocher --- diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index a767dee986..c656cf8b7a 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -1015,7 +1015,7 @@ static int omap_i2c_probe_chip(struct udevice *bus, uint chip_addr, struct omap_i2c *priv = dev_get_priv(bus); return __omap24_i2c_probe(priv->regs, priv->ip_rev, priv->waitdelay, - chip_addr); + chip_addr) ? -EREMOTEIO : 0; } static int omap_i2c_probe(struct udevice *bus)