projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c485be
)
regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_ext
author
Axel Lin
<axel.lin@ingics.com>
Tue, 15 Jun 2021 13:29:34 +0000
(21:29 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 15 Jun 2021 15:43:01 +0000
(16:43 +0100)
devm_regmap_init_spmi_ext() returns ERR_PTR() on error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link:
https://lore.kernel.org/r/20210615132934.3453965-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mt6315-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/mt6315-regulator.c
b/drivers/regulator/mt6315-regulator.c
index
8c5d728
..
ebb68d3
100644
(file)
--- a/
drivers/regulator/mt6315-regulator.c
+++ b/
drivers/regulator/mt6315-regulator.c
@@
-223,8
+223,8
@@
static int mt6315_regulator_probe(struct spmi_device *pdev)
int i;
regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config);
- if (
!regmap
)
- return
-ENODEV
;
+ if (
IS_ERR(regmap)
)
+ return
PTR_ERR(regmap)
;
chip = devm_kzalloc(dev, sizeof(struct mt6315_chip), GFP_KERNEL);
if (!chip)