summaryrefslogtreecommitdiff
path: root/drivers/regulator/bd71815-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/bd71815-regulator.c')
-rw-r--r--drivers/regulator/bd71815-regulator.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c
index c2b8b8be7824..8b55046eded8 100644
--- a/drivers/regulator/bd71815-regulator.c
+++ b/drivers/regulator/bd71815-regulator.c
@@ -602,12 +602,10 @@ static int bd7181x_probe(struct platform_device *pdev)
config.ena_gpiod = NULL;
rdev = devm_regulator_register(&pdev->dev, desc, &config);
- if (IS_ERR(rdev)) {
- dev_err(&pdev->dev,
- "failed to register %s regulator\n",
- desc->name);
- return PTR_ERR(rdev);
- }
+ if (IS_ERR(rdev))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rdev),
+ "failed to register %s regulator\n",
+ desc->name);
}
return 0;
}