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
parent
e7d8a0de70
commit
6df65313ed
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue