Message ID | 202303221640559786295@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | i2c: gpio: Use dev_err_probe() | expand |
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 1794c0399f22..a83f241d7b62 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -355,8 +355,8 @@ static struct gpio_desc *i2c_gpio_get_desc(struct device *dev, if (ret == -ENOENT) retdesc = ERR_PTR(-EPROBE_DEFER); - if (PTR_ERR(retdesc) != -EPROBE_DEFER) - dev_err(dev, "error trying to get descriptor: %d\n", ret); + dev_err_probe(dev, PTR_ERR(retdesc), + "error trying to get descriptor: %d\n"); return retdesc; }