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:
6cbff4b
)
ASoC: codecs: remove redundant ret variable
author
Minghao Chi
<chi.minghao@zte.com.cn>
Mon, 10 Jan 2022 01:28:33 +0000
(
01:28
+0000)
committer
Mark Brown
<broonie@kernel.org>
Mon, 24 Jan 2022 13:31:55 +0000
(13:31 +0000)
Return value from devm_snd_soc_register_component() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link:
https://lore.kernel.org/r/20220110012833.643994-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8971.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/wm8971.c
b/sound/soc/codecs/wm8971.c
index
21ae55c
..
ddf0e2f
100644
(file)
--- a/
sound/soc/codecs/wm8971.c
+++ b/
sound/soc/codecs/wm8971.c
@@
-676,7
+676,6
@@
static int wm8971_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
struct wm8971_priv *wm8971;
- int ret;
wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv),
GFP_KERNEL);
@@
-689,10
+688,8
@@
static int wm8971_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata(i2c, wm8971);
- ret
=
devm_snd_soc_register_component(&i2c->dev,
+ ret
urn
devm_snd_soc_register_component(&i2c->dev,
&soc_component_dev_wm8971, &wm8971_dai, 1);
-
- return ret;
}
static const struct i2c_device_id wm8971_i2c_id[] = {