From: Takashi Iwai Date: Fri, 8 Jul 2011 09:35:11 +0000 (+0200) Subject: ALSA: hda - Fix Oops in smart51 parsing in VIA codec X-Git-Tag: v3.1-rc2~4^2~47^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21d45d2ba97fa5bcb41b444095338dde792026d3;p=platform%2Fkernel%2Flinux-3.10.git ALSA: hda - Fix Oops in smart51 parsing in VIA codec Typical off-by-one thinko. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index dbc862e..d051cb5 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;