[PATCH] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()

Neo Chang posted 1 patch 1 week, 3 days ago
sound/soc/codecs/nau8360-dsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()
Posted by Neo Chang 1 week, 3 days ago
Fix a smatch static analysis warning: "missing error code? 'ret'".

When there are no message parameters (!cmd_info->msg_param), 'ret' is
guaranteed to be 0. Return 0 directly.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202609081933.K4tVJnyh-lkp@intel.com/
Signed-off-by: Neo Chang <YLCHANG2@nuvoton.com>
---
 sound/soc/codecs/nau8360-dsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/nau8360-dsp.c b/sound/soc/codecs/nau8360-dsp.c
index 2e5b61bfc303..65ffec8b3a39 100644
--- a/sound/soc/codecs/nau8360-dsp.c
+++ b/sound/soc/codecs/nau8360-dsp.c
@@ -211,7 +211,7 @@ static int nau8360_message_to_dsp(struct snd_soc_component *cp,
 	snd_soc_component_write(cp, dsp_addr, payload);
 
 	if (!cmd_info->msg_param)
-		return ret;
+		return 0;
 
 	/* sending payload + padding */
 	payload = nau8360_pack_param(param_offset, param_size);
-- 
2.25.1
Re: [PATCH] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()
Posted by Mark Brown 1 week, 1 day ago
On Tue, 15 Sep 2026 09:49:40 +0800, Neo Chang wrote:
> ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()

Applied to

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

Thanks!

[1/1] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()
      https://git.kernel.org/broonie/sound/c/ed7d8ed9a915

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
Re: [PATCH] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()
Posted by Mark Brown 1 week, 1 day ago
On Tue, 15 Sep 2026 09:49:40 +0800, Neo Chang wrote:
> ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()

Applied to

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

Thanks!

[1/1] ASoC: codecs: nau8360: Fix misleading return in nau8360_message_to_dsp()
      https://git.kernel.org/broonie/sound/c/40ebc8f73630

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