diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-30 03:35:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-30 13:11:25 -0400 |
commit | 5a7615cf1fcaaf1598b5689e54915d88c2344788 (patch) | |
tree | dbc71934884365b85725506d22d0c0ab79025097 /sound/soc | |
parent | ebce31140c2ddfda005e88957ac1ee1eacaa8dc5 (diff) |
ASoC: rt5640: Fix ignored error checks
The negative error value returned from get_sdp_info() is ignored
because it's assigned to unsigned variables.
Spotted by coverity CIDs 1042657, 1042658.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/rt5640.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 4d041d376f31..a3fb41179636 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
@@ -1604,8 +1604,8 @@ static int rt5640_hw_params(struct snd_pcm_substream *substream, | |||
1604 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1604 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1605 | struct snd_soc_codec *codec = rtd->codec; | 1605 | struct snd_soc_codec *codec = rtd->codec; |
1606 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 1606 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
1607 | unsigned int val_len = 0, val_clk, mask_clk, dai_sel; | 1607 | unsigned int val_len = 0, val_clk, mask_clk; |
1608 | int pre_div, bclk_ms, frame_size; | 1608 | int dai_sel, pre_div, bclk_ms, frame_size; |
1609 | 1609 | ||
1610 | rt5640->lrck[dai->id] = params_rate(params); | 1610 | rt5640->lrck[dai->id] = params_rate(params); |
1611 | pre_div = get_clk_info(rt5640->sysclk, rt5640->lrck[dai->id]); | 1611 | pre_div = get_clk_info(rt5640->sysclk, rt5640->lrck[dai->id]); |
@@ -1675,7 +1675,8 @@ static int rt5640_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
1675 | { | 1675 | { |
1676 | struct snd_soc_codec *codec = dai->codec; | 1676 | struct snd_soc_codec *codec = dai->codec; |
1677 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 1677 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
1678 | unsigned int reg_val = 0, dai_sel; | 1678 | unsigned int reg_val = 0; |
1679 | int dai_sel; | ||
1679 | 1680 | ||
1680 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 1681 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
1681 | case SND_SOC_DAIFMT_CBM_CFM: | 1682 | case SND_SOC_DAIFMT_CBM_CFM: |