From 21d45d2ba97fa5bcb41b444095338dde792026d3 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 8 Jul 2011 11:35:11 +0200 Subject: [PATCH] ALSA: hda - Fix Oops in smart51 parsing in VIA codec Typical off-by-one thinko. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index dbc862e4ff1..d051cb53dd8 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; -- 2.46.0