Skip to content

Commit

Permalink
ASoC: max9867: remove unused ‘ret’
Browse files Browse the repository at this point in the history
In max9867_dai_set_fmt(), 'ret' is initialized as return value of
regmap_raw_write() but never checked, so remove this and assignement.

sound/soc/codecs/max9867.c: In function ‘max9867_dai_set_fmt’:
sound/soc/codecs/max9867.c:312:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  int ret;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Vinod Koul authored and broonie committed Dec 15, 2016
1 parent a5de5b7 commit 9fe78b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/codecs/max9867.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
struct snd_soc_codec *codec = codec_dai->codec;
struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec);
u8 iface1A = 0, iface1B = 0;
int ret;

switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM:
Expand Down Expand Up @@ -346,8 +345,8 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
return -EINVAL;
}

ret = regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A);
ret = regmap_write(max9867->regmap, MAX9867_IFC1B, iface1B);
regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A);
regmap_write(max9867->regmap, MAX9867_IFC1B, iface1B);
return 0;
}

Expand Down

0 comments on commit 9fe78b2

Please sign in to comment.