sound/soc/codecs/pcm6240.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
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
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
© 2016 - 2026 Red Hat, Inc.