2022-09-08 01:26:32

by CGEL

[permalink] [raw]
Subject: [PATCH linux-next] ASoC: sti-sas: Remove the unneeded result variable

From: ye xingchen <[email protected]>

Return the value regmap_write() and sti_sas_init_sas_registers() directly
instead of storing it in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: ye xingchen <[email protected]>
---
sound/soc/codecs/sti-sas.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index f076878908ee..99545bcb2ba9 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -96,11 +96,8 @@ static int sti_sas_write_reg(void *context, unsigned int reg,
unsigned int value)
{
struct sti_sas_data *drvdata = context;
- int status;
-
- status = regmap_write(drvdata->dac.regmap, reg, value);

- return status;
+ return regmap_write(drvdata->dac.regmap, reg, value);
}

static int sti_sas_init_sas_registers(struct snd_soc_component *component,
@@ -385,11 +382,8 @@ static int sti_sas_resume(struct snd_soc_component *component)
static int sti_sas_component_probe(struct snd_soc_component *component)
{
struct sti_sas_data *drvdata = dev_get_drvdata(component->dev);
- int ret;

- ret = sti_sas_init_sas_registers(component, drvdata);
-
- return ret;
+ return sti_sas_init_sas_registers(component, drvdata);
}

static struct snd_soc_component_driver sti_sas_driver = {
--
2.25.1


2022-09-08 13:25:19

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH linux-next] ASoC: sti-sas: Remove the unneeded result variable

On Thu, 8 Sep 2022 01:03:04 +0000, [email protected] wrote:
> From: ye xingchen <[email protected]>
>
> Return the value regmap_write() and sti_sas_init_sas_registers() directly
> instead of storing it in another redundant variable.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: sti-sas: Remove the unneeded result variable
commit: b075f21e533aa51c2bda87d86ddfb6a3c0e38a92

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