Skip to content

Commit

Permalink
i2c: gpio: Use dev_err_probe()
Browse files Browse the repository at this point in the history
Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
  • Loading branch information
Ye Xingchen authored and intel-lab-lkp committed Mar 22, 2023
1 parent 7618417 commit 6d20957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-gpio.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d20957

Please sign in to comment.