]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: intel-sdw-acpi: harden detection of controller
authorLibin Yang <libin.yang@intel.com>
Tue, 21 Dec 2021 01:08:16 +0000 (09:08 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 22 Dec 2021 19:17:37 +0000 (20:17 +0100)
commit908f2bc919470f2eb8fb22097a0caa57d996aed5
treeaf7fd09adc9ccbc5317ce064bad5a746c405ab1f
parent2d071e2d785f645e3364d3cb29e9ca654f38a3d3
ALSA: hda: intel-sdw-acpi: harden detection of controller

The existing code currently sets a pointer to an ACPI handle before
checking that it's actually a SoundWire controller. This can lead to
issues where the graph walk continues and eventually fails, but the
pointer was set already.

This patch changes the logic so that the information provided to
the caller is set when a controller is found.

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211221010817.23636-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/intel-sdw-acpi.c