Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: scx200_acb: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-11-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>

authored by

Enrico Zanda and committed by
Andi Shyti
6df65313 e7d8a0de

+2 -4
+2 -4
drivers/i2c/busses/scx200_acb.c
··· 500 500 struct resource *res; 501 501 502 502 res = platform_get_resource(pdev, IORESOURCE_IO, 0); 503 - if (!res) { 504 - dev_err(&pdev->dev, "can't fetch device resource info\n"); 505 - return -ENODEV; 506 - } 503 + if (!res) 504 + return dev_err_probe(&pdev->dev, -ENODEV, "can't fetch device resource info\n"); 507 505 508 506 iface = scx200_create_dev("CS5535", res->start, 0, &pdev->dev); 509 507 if (!iface)