linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ASoC: codecs: max98088: remove redundant ret variable
@ 2022-08-29  9:13 cgel.zte
  2022-08-29 15:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-29  9:13 UTC (permalink / raw)
  To: lgirdwood
  Cc: broonie, perex, tiwai, tommaso.merciai, cui.jinpeng2,
	jiapeng.chong, steve, ckeepax, alsa-devel, linux-kernel,
	Zeal Robot

From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

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: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
 sound/soc/codecs/max98088.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index b208fb530a8b..405ec16be2b6 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1749,7 +1749,6 @@ MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
 static int max98088_i2c_probe(struct i2c_client *i2c)
 {
 	struct max98088_priv *max98088;
-	int ret;
 	const struct i2c_device_id *id;
 
 	max98088 = devm_kzalloc(&i2c->dev, sizeof(struct max98088_priv),
@@ -1772,9 +1771,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c)
 	i2c_set_clientdata(i2c, max98088);
 	max98088->pdata = i2c->dev.platform_data;
 
-	ret = devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_max98088,
+	return devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_max98088,
 					      &max98088_dai[0], 2);
-	return ret;
 }
 
 #if defined(CONFIG_OF)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] ASoC: codecs: max98088: remove redundant ret variable
  2022-08-29  9:13 [PATCH linux-next] ASoC: codecs: max98088: remove redundant ret variable cgel.zte
@ 2022-08-29 15:57 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-08-29 15:57 UTC (permalink / raw)
  To: lgirdwood, cgel.zte
  Cc: linux-kernel, Zeal Robot, ckeepax, cui.jinpeng2, perex,
	jiapeng.chong, tiwai, tommaso.merciai, steve, alsa-devel

On Mon, 29 Aug 2022 09:13:19 +0000, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> 
> Return value from devm_snd_soc_register_component() directly
> instead of taking this in another redundant variable.
> 
> 

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: max98088: remove redundant ret variable
      commit: e0550fffd5b3d32118a335718d1e3ec93e6bc411

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29  9:13 [PATCH linux-next] ASoC: codecs: max98088: remove redundant ret variable cgel.zte
2022-08-29 15:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).