Skip to content

Commit

Permalink
ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
Browse files Browse the repository at this point in the history
[ Upstream commit 2abdf9f ]

Currently wm_adsp_fw_put() returns 0 rather than 1 when updating the value
of the control, meaning that no event is generated to userspace. Fix this
by setting the default return value to 1, the code already exits early with
a return value of 0 if the value is unchanged.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220603115003.3865834-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
broonie authored and gregkh committed Jun 22, 2022
1 parent a572c74 commit 2e640e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
struct wm_adsp *dsp = snd_soc_component_get_drvdata(component);
int ret = 0;
int ret = 1;

if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw)
return 0;
Expand Down

0 comments on commit 2e640e5

Please sign in to comment.