mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:37:59 +07:00
ASoC: codecs: ak4458: Remove set but never checked variable 'ret'
Looks as though the result of snd_soc_update_bits() has never been checked. Fixes the following W=1 kernel build warning(s): sound/soc/codecs/ak4458.c: In function ‘ak4458_set_dai_mute’: sound/soc/codecs/ak4458.c:408:16: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp> Cc: Mihai Serban <mihai.serban@nxp.com> Link: https://lore.kernel.org/r/20200709162328.259586-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c90a67458e
commit
cc3cceedcb
@ -405,7 +405,7 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
|
|||||||
{
|
{
|
||||||
struct snd_soc_component *component = dai->component;
|
struct snd_soc_component *component = dai->component;
|
||||||
struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
|
struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
|
||||||
int nfs, ndt, ret, reg;
|
int nfs, ndt, reg;
|
||||||
int ats;
|
int ats;
|
||||||
|
|
||||||
nfs = ak4458->fs;
|
nfs = ak4458->fs;
|
||||||
@ -416,14 +416,14 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
|
|||||||
ndt = att_speed[ats] / (nfs / 1000);
|
ndt = att_speed[ats] / (nfs / 1000);
|
||||||
|
|
||||||
if (mute) {
|
if (mute) {
|
||||||
ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1);
|
snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1);
|
||||||
mdelay(ndt);
|
mdelay(ndt);
|
||||||
if (ak4458->mute_gpiod)
|
if (ak4458->mute_gpiod)
|
||||||
gpiod_set_value_cansleep(ak4458->mute_gpiod, 1);
|
gpiod_set_value_cansleep(ak4458->mute_gpiod, 1);
|
||||||
} else {
|
} else {
|
||||||
if (ak4458->mute_gpiod)
|
if (ak4458->mute_gpiod)
|
||||||
gpiod_set_value_cansleep(ak4458->mute_gpiod, 0);
|
gpiod_set_value_cansleep(ak4458->mute_gpiod, 0);
|
||||||
ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0);
|
snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0);
|
||||||
mdelay(ndt);
|
mdelay(ndt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user