Skip to content

Commit

Permalink
ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
Browse files Browse the repository at this point in the history
Without this terminating entry, the pin matching would continue
across random memory until a zero or a non-matching entry was found.

The result being that in some cases, the pin quirk would not be
applied correctly.

Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Oct 24, 2014
1 parent dde1c65 commit fb54a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/hda_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,15 @@ struct snd_hda_pin_quirk {
.subvendor = _subvendor,\
.name = _name,\
.value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \
.pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
}
#else

#define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \
{ .codec = _codec,\
.subvendor = _subvendor,\
.value = _value,\
.pins = (const struct hda_pintbl[]) { _pins } \
.pins = (const struct hda_pintbl[]) { _pins, {0, 0}} \
}

#endif
Expand Down

0 comments on commit fb54a64

Please sign in to comment.