Skip to contentSkip to conversation

ASoC: codecs: pcm6240: Return 0 explicitly on success

PATCH In review [email protected] 2 participants 2 messages Sep 16 – Sep 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: codecs: pcm6240: Return 0 explicitly on success

From: bui duc phuc <[email protected]>

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.

---
 sound/soc/codecs/pcm6240.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/pcm6240.c +3 -3
index db85ae2f8aed..4b5569a5b062 100644
@@ -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,
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 1 line · On Wed, 16 Sep 2026 13:36:01 +0700, [email protected] 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