Skip to content

Commit

Permalink
ALSA: hda - Fix Oops in smart51 parsing in VIA codec
Browse files Browse the repository at this point in the history
Typical off-by-one thinko.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 8, 2011
1 parent e477062 commit 21d45d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ static void mangle_smart51(struct hda_codec *codec)
for (j = 0; j < nums; j++)
if (ins[pins[j]].type < ins[i].type) {
memmove(pins + j + 1, pins + j,
(nums - j - 1) * sizeof(int));
(nums - j) * sizeof(int));
break;
}
pins[j] = i;
Expand Down

0 comments on commit 21d45d2

Please sign in to comment.