summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-08 11:35:11 +0200
committerTakashi Iwai <tiwai@suse.de>2011-07-08 11:35:11 +0200
commit21d45d2ba97fa5bcb41b444095338dde792026d3 (patch)
treed0120c8ce0d2e6ddbe20ceb4f772e3355708219f /sound
parentALSA: hda - Provide the standard auto_init for Realtek codecs (diff)
downloadlinux-21d45d2ba97fa5bcb41b444095338dde792026d3.tar.xz
linux-21d45d2ba97fa5bcb41b444095338dde792026d3.zip
ALSA: hda - Fix Oops in smart51 parsing in VIA codec
Typical off-by-one thinko. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_via.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index dbc862e4ff13..d051cb53dd86 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -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;