]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function
authorEnrico Zanda <e.zanda1@gmail.com>
Tue, 15 Apr 2025 18:34:46 +0000 (20:34 +0200)
committerAndi Shyti <andi@smida.it>
Mon, 19 May 2025 20:23:55 +0000 (22:23 +0200)
This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-xiic.c

index dc1e46d834dc01e8ccd53f8283134783e43881a4..6bc1575cea6cbfac2d52b7a4aa357cb336943358 100644 (file)
@@ -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;
        }