From: Enrico Zanda Date: Tue, 15 Apr 2025 18:34:46 +0000 (+0200) Subject: i2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e7d8a0de7039f57e7f4495f30ce13868aa8e03f2;p=users%2Fjedix%2Flinux-maple.git i2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com Signed-off-by: Andi Shyti --- diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index dc1e46d834dc0..6bc1575cea6cb 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1489,7 +1489,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) pdev->name, i2c); if (ret < 0) { - dev_err(&pdev->dev, "Cannot claim IRQ\n"); + dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n"); goto err_pm_disable; } @@ -1510,7 +1510,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) ret = xiic_reinit(i2c); if (ret < 0) { - dev_err(&pdev->dev, "Cannot xiic_reinit\n"); + dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); goto err_pm_disable; }