forked from Minki/linux
ASoC: davinci-mcasp: off-by-one in davinci_mcasp_hw_rule_format()
The SNDRV_PCM_FORMAT_LAST is valid, we should not skip it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2961d6707c
commit
9be072a6f9
@ -1218,7 +1218,7 @@ static int davinci_mcasp_hw_rule_format(struct snd_pcm_hw_params *params,
|
||||
|
||||
snd_mask_none(&nfmt);
|
||||
|
||||
for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
|
||||
for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
|
||||
if (snd_mask_test(fmt, i)) {
|
||||
uint sbits = snd_pcm_format_width(i);
|
||||
int ppm;
|
||||
|
Loading…
Reference in New Issue
Block a user