projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f80505f
)
regulator: cros-ec: Fix error code in dev_err message
author
Axel Lin
<axel.lin@ingics.com>
Wed, 12 May 2021 07:58:24 +0000
(15:58 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 12 May 2021 12:01:41 +0000
(13:01 +0100)
Show proper error code instead of 0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link:
https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/cros-ec-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/cros-ec-regulator.c
b/drivers/regulator/cros-ec-regulator.c
index
eb3fc1d
..
c4754f3
100644
(file)
--- a/
drivers/regulator/cros-ec-regulator.c
+++ b/
drivers/regulator/cros-ec-regulator.c
@@
-225,8
+225,9
@@
static int cros_ec_regulator_probe(struct platform_device *pdev)
drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
if (IS_ERR(drvdata->dev)) {
+ ret = PTR_ERR(drvdata->dev);
dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
- return
PTR_ERR(drvdata->dev)
;
+ return
ret
;
}
platform_set_drvdata(pdev, drvdata);