Skip to content

Commit 3747cd2

Browse files
Hamish MartinWolfram Sang
authored andcommitted
i2c: gpio: suppress error on probe defer
If a GPIO we are trying to use is not available and we are deferring the probe, don't output an error message. This seems to have been the intent of commit 05c7477 ("i2c: gpio: Add support for named gpios in DT") but the error was still output due to not checking the updated 'retdesc'. Fixes: 05c7477 ("i2c: gpio: Add support for named gpios in DT") Signed-off-by: Hamish Martin <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent bcf3588 commit 3747cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static struct gpio_desc *i2c_gpio_get_desc(struct device *dev,
348348
if (ret == -ENOENT)
349349
retdesc = ERR_PTR(-EPROBE_DEFER);
350350

351-
if (ret != -EPROBE_DEFER)
351+
if (PTR_ERR(retdesc) != -EPROBE_DEFER)
352352
dev_err(dev, "error trying to get descriptor: %d\n", ret);
353353

354354
return retdesc;

0 commit comments

Comments
 (0)