Unverified Commit c3ce4464 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents b5cc9c3b 88294471
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -64,7 +64,8 @@ static int speaker_gain_control_put(struct snd_kcontrol *kcontrol,
	struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
	struct max9759 *priv = snd_soc_component_get_drvdata(c);

	if (ucontrol->value.integer.value[0] > 3)
	if (ucontrol->value.integer.value[0] < 0 ||
	    ucontrol->value.integer.value[0] > 3)
		return -EINVAL;

	priv->gain = ucontrol->value.integer.value[0];