ALSA: hda - Fix potential endless loop at applying quirks
authorTakashi Iwai <tiwai@suse.de>
Thu, 29 Aug 2019 07:52:02 +0000 (09:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 29 Aug 2019 12:40:07 +0000 (14:40 +0200)
commit333f31436d3db19f4286f8862a00ea1d8d8420a1
tree9f9871139f59e2d4c634411bc6283e8d8a5a3eb7
parent2fd2329393658514db074abd4f7dea8da1c20f81
ALSA: hda - Fix potential endless loop at applying quirks

Since the chained quirks via chained_before flag is applied before the
depth check, it may lead to the endless recursive calls, when the
chain were set up incorrectly.  Fix it by moving the depth check at
the beginning of the loop.

Fixes: 1f57825077dc ("ALSA: hda - Add chained_before flag to the fixup entry")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c