Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360967
b: refs/heads/master
c: 3bc085a
h: refs/heads/master
i:
  360965: 248cd0e
  360963: 956fb3f
  360959: b167cdd
v: v3
  • Loading branch information
Xi Wang authored and Takashi Iwai committed Mar 7, 2013
1 parent 9c4e7c6 commit dd213ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c7a548a70a44269266858f65c3b5fc9c3ace057
refs/heads/master: 3bc085a12d8f9f3e45a4ac0cc24a34abd5b20657
8 changes: 6 additions & 2 deletions trunk/sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -2298,6 +2298,11 @@ static int dspxfr_one_seg(struct hda_codec *codec,
hda_frame_size_words = ((sample_rate_div == 0) ? 0 :
(num_chans * sample_rate_mul / sample_rate_div));

if (hda_frame_size_words == 0) {
snd_printdd(KERN_ERR "frmsz zero\n");
return -EINVAL;
}

buffer_size_words = min(buffer_size_words,
(unsigned int)(UC_RANGE(chip_addx, 1) ?
65536 : 32768));
Expand All @@ -2308,8 +2313,7 @@ static int dspxfr_one_seg(struct hda_codec *codec,
chip_addx, hda_frame_size_words, num_chans,
sample_rate_mul, sample_rate_div, buffer_size_words);

if ((buffer_addx == NULL) || (hda_frame_size_words == 0) ||
(buffer_size_words < hda_frame_size_words)) {
if (buffer_size_words < hda_frame_size_words) {
snd_printdd(KERN_ERR "dspxfr_one_seg:failed\n");
return -EINVAL;
}
Expand Down

0 comments on commit dd213ae

Please sign in to comment.