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:
cf7250e
)
ASoC: rt5645: Fix the error handling of rt5645_i2c_probe()
author
Zheyu Ma
<zheyuma97@gmail.com>
Tue, 10 May 2022 15:32:48 +0000
(23:32 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 11 May 2022 16:40:14 +0000
(17:40 +0100)
After enabling the regulator, The driver should disable the regulator
when failing at probing.
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link:
https://lore.kernel.org/r/20220510153251.1741210-4-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt5645.c
b/sound/soc/codecs/rt5645.c
index
1518eb7
..
ccdea23
100644
(file)
--- a/
sound/soc/codecs/rt5645.c
+++ b/
sound/soc/codecs/rt5645.c
@@
-3943,7
+3943,7
@@
static int rt5645_i2c_probe(struct i2c_client *i2c)
ret = PTR_ERR(regmap);
dev_err(&i2c->dev, "Failed to allocate temp register map: %d\n",
ret);
-
return ret
;
+
goto err_enable
;
}
/*
@@
-3974,7
+3974,7
@@
static int rt5645_i2c_probe(struct i2c_client *i2c)
ret = PTR_ERR(rt5645->regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
ret);
-
return ret
;
+
goto err_enable
;
}
regmap_write(rt5645->regmap, RT5645_RESET, 0);