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>
pull/1253/head
Enrico Zanda 2025-04-15 20:34:47 +02:00 committed by Andi Shyti
parent e7d8a0de70
commit 6df65313ed
1 changed files with 2 additions and 4 deletions

View File

@ -500,10 +500,8 @@ static int scx200_probe(struct platform_device *pdev)
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
if (!res) {
dev_err(&pdev->dev, "can't fetch device resource info\n");
return -ENODEV;
}
if (!res)
return dev_err_probe(&pdev->dev, -ENODEV, "can't fetch device resource info\n");
iface = scx200_create_dev("CS5535", res->start, 0, &pdev->dev);
if (!iface)