Skip to content

Commit

Permalink
ASoC: Report an error for unknown adav80x formats
Browse files Browse the repository at this point in the history
Not only fixes error handling but also some uninitialized variable
warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
  • Loading branch information
Mark Brown committed Jul 17, 2011
1 parent f0f5039 commit ca1004b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/adav80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static int adav80x_set_capture_pcm_format(struct snd_soc_codec *codec,
val = ADAV80X_CAPTURE_WORD_LEN24;
break;
default:
break;
return -EINVAL;
}

snd_soc_update_bits(codec, adav80x_port_ctrl_regs[dai->id][0],
Expand Down Expand Up @@ -488,7 +488,7 @@ static int adav80x_set_playback_pcm_format(struct snd_soc_codec *codec,
val = ADAV80X_PLAYBACK_MODE_RIGHT_J_24;
break;
default:
break;
return -EINVAL;
}

snd_soc_update_bits(codec, adav80x_port_ctrl_regs[dai->id][1],
Expand Down

0 comments on commit ca1004b

Please sign in to comment.