diff mbox series

[v1] ASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret'

Message ID 20230107175933.12973-1-ajye_huang@compal.corp-partner.google.com
State Accepted
Commit 05d450b06d6a299bd5a7f209c81db681c3cdbcd9
Headers show
Series [v1] ASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret' | expand

Commit Message

Ajye Huang Jan. 7, 2023, 5:59 p.m. UTC
The function primary_codec_init() should return 0 if dmic_sel is null.

Here is the warning message reported by 0-DAY CI Kernel Test Service.

smatch warnings:
primary_codec_init() warn: missing error code? 'ret'
...
2022-11-02  141       if (!priv->dmic_sel) {
2022-11-02  142               dev_info(card->dev, "dmic_sel is null\n");
2022-11-02 @143               return ret;

return -EIVNAL;?  return 0;?

2022-11-02  144       }

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

---
 sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Jan. 9, 2023, 4:49 p.m. UTC | #1
On Sun, 08 Jan 2023 01:59:33 +0800, Ajye Huang wrote:
> The function primary_codec_init() should return 0 if dmic_sel is null.
> 
> Here is the warning message reported by 0-DAY CI Kernel Test Service.
> 
> smatch warnings:
> primary_codec_init() warn: missing error code? 'ret'
> ...
> 2022-11-02  141       if (!priv->dmic_sel) {
> 2022-11-02  142               dev_info(card->dev, "dmic_sel is null\n");
> 2022-11-02 @143               return ret;
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret'
      commit: 05d450b06d6a299bd5a7f209c81db681c3cdbcd9

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
diff mbox series

Patch

diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
index af44e331dae8..b333950aa3c3 100644
--- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
+++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
@@ -140,7 +140,7 @@  static int primary_codec_init(struct snd_soc_pcm_runtime *rtd)
 
 	if (!priv->dmic_sel) {
 		dev_info(card->dev, "dmic_sel is null\n");
-		return ret;
+		return 0;
 	}
 
 	ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,