mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
regulator: virtual: use dev_err_probe()
Use dev_err_probe() to avoid printing spurious warnings on probe deferral. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Link: https://lore.kernel.org/r/20220301111831.3742383-2-vincent.whitchurch@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a94e5cd845
commit
75c3543e39
@ -295,12 +295,10 @@ static int regulator_virtual_probe(struct platform_device *pdev)
|
||||
mutex_init(&drvdata->lock);
|
||||
|
||||
drvdata->regulator = devm_regulator_get(&pdev->dev, reg_id);
|
||||
if (IS_ERR(drvdata->regulator)) {
|
||||
ret = PTR_ERR(drvdata->regulator);
|
||||
dev_err(&pdev->dev, "Failed to obtain supply '%s': %d\n",
|
||||
reg_id, ret);
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(drvdata->regulator))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->regulator),
|
||||
"Failed to obtain supply '%s'\n",
|
||||
reg_id);
|
||||
|
||||
ret = sysfs_create_group(&pdev->dev.kobj,
|
||||
®ulator_virtual_attr_group);
|
||||
|
Loading…
Reference in New Issue
Block a user