未验证 提交 4ec19dee 编写于 作者: M Minghao Chi 提交者: Mark Brown

ASoC: codecs: remove redundant ret variable

Return value from devm_snd_soc_register_component() directly instead
of taking this in another redundant variable.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: NCGEL ZTE <cgel.zte@gmail.com>
Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220110012833.643994-1-chi.minghao@zte.com.cnSigned-off-by: NMark Brown <broonie@kernel.org>
上级 6cbff4b3
...@@ -676,7 +676,6 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, ...@@ -676,7 +676,6 @@ static int wm8971_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
struct wm8971_priv *wm8971; struct wm8971_priv *wm8971;
int ret;
wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv), wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv),
GFP_KERNEL); GFP_KERNEL);
...@@ -689,10 +688,8 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, ...@@ -689,10 +688,8 @@ static int wm8971_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata(i2c, wm8971); i2c_set_clientdata(i2c, wm8971);
ret = devm_snd_soc_register_component(&i2c->dev, return devm_snd_soc_register_component(&i2c->dev,
&soc_component_dev_wm8971, &wm8971_dai, 1); &soc_component_dev_wm8971, &wm8971_dai, 1);
return ret;
} }
static const struct i2c_device_id wm8971_i2c_id[] = { static const struct i2c_device_id wm8971_i2c_id[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册