All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: pcm6240: Return 0 explicitly on success
@ 2026-09-16  6:36 phucduc.bui
  2026-09-16 21:09 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-09-16  6:36 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: Kees Cook, Kuninori Morimoto, u.kleine-koenig, Rosen Penev,
	Dan Carpenter, linux-sound, linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

The return value of pcmdev_dev_read() is already checked, and
errors are returned immediately. Therefore, the remaining paths
are successful paths and should return 0 explicitly instead of
returning ret.

Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/all/aqfHiX3pE-0BiCt9@stanley.mountain/
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/codecs/pcm6240.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/pcm6240.c b/sound/soc/codecs/pcm6240.c
index db85ae2f8aed..4b5569a5b062 100644
--- a/sound/soc/codecs/pcm6240.c
+++ b/sound/soc/codecs/pcm6240.c
@@ -620,12 +620,12 @@ static int pcmdev_get_volsw(struct snd_kcontrol *kcontrol,
 		/* Set to wide-range mode, before using vol ctrl. */
 		if (!val && vol_ctrl_type == PCMDEV_PCM1690_VOL_CTRL) {
 			ucontrol->value.integer.value[0] = -25500;
-			return ret;
+			return 0;
 		}
 		/* Set to fine mode, before using fine vol ctrl. */
 		if (val && vol_ctrl_type == PCMDEV_PCM1690_FINE_VOL_CTRL) {
 			ucontrol->value.integer.value[0] = -12750;
-			return ret;
+			return 0;
 		}
 	}
 
@@ -641,7 +641,7 @@ static int pcmdev_get_volsw(struct snd_kcontrol *kcontrol,
 	val = mc->invert ? max - val : val;
 	ucontrol->value.integer.value[0] = val;
 
-	return ret;
+	return 0;
 }
 
 static int pcmdevice_get_volsw(struct snd_kcontrol *kcontrol,
-- 
2.43.0


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

* Re: [PATCH] ASoC: codecs: pcm6240: Return 0 explicitly on success
  2026-09-16  6:36 [PATCH] ASoC: codecs: pcm6240: Return 0 explicitly on success phucduc.bui
@ 2026-09-16 21:09 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-16 21:09 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, phucduc.bui
  Cc: Kees Cook, Kuninori Morimoto, u.kleine-koenig, Rosen Penev,
	Dan Carpenter, linux-sound, linux-kernel

On Wed, 16 Sep 2026 13:36:01 +0700, phucduc.bui@gmail.com wrote:
> ASoC: codecs: pcm6240: Return 0 explicitly on success

Applied to

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

Thanks!

[1/1] ASoC: codecs: pcm6240: Return 0 explicitly on success
      https://git.kernel.org/broonie/sound/c/bb345be9d428

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:[~2026-09-17 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16  6:36 [PATCH] ASoC: codecs: pcm6240: Return 0 explicitly on success phucduc.bui
2026-09-16 21:09 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.