Skip to contentSkip to conversation

ALSA: hda: cs35l56: Don't 'return ret' if ret is always zero

PATCH Applied Richard Fitzgerald 2 participants 2 messages Sep 14, 2023 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: cs35l56: Don't 'return ret' if ret is always zero

The final return in cs35l56_hda_posture_get() was returning the value of 'ret', but ret is always zero at this point. So this can be a simple 'return 0'.

---
 sound/pci/hda/cs35l56_hda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/cs35l56_hda.c +1 -1
index a9844336bdc9..c64600280f02 100644
@@ -216,11 +216,11 @@ static int cs35l56_hda_posture_get(struct snd_kcontrol *kcontrol,
 	if (ret)
 		return ret;
 
 	ucontrol->value.integer.value[0] = pos;
 
-	return ret;
+	return 0;
 }
 
 static int cs35l56_hda_posture_put(struct snd_kcontrol *kcontrol,
 				   struct snd_ctl_elem_value *ucontrol)
 {
Signature · 1 line
2.30.2
Applied
#1 lore raw
Quoted 6 lines · Richard Fitzgerald

The final return in cs35l56_hda_posture_get() was returning the value of 'ret', but ret is always zero at this point. So this can be a simple 'return 0'.

Thanks, applied.

Takashi