]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: sdca: test adev before calling acpi_dev_for_each_child
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 13 Nov 2024 06:41:33 +0000 (14:41 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 13 Nov 2024 13:53:09 +0000 (13:53 +0000)
commitde35b06bf15cb56c96c7a69474e305852cc170e3
treecd20a3c75f0ddb476f160ff5fc36b2141db08a73
parentfb5e67c9d03b4a65fd43acc18cbafffff15bd8f9
ASoC: sdca: test adev before calling acpi_dev_for_each_child

sdca_lookup_functions may be called by a Peripheral that is not listed
in the ACPI table. Testing adev is required to avoid kernel NULL pointer
dereference.

Fixes: 3a513da1ae33 ("ASoC: SDCA: add initial module")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241113064133.162501-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sdca/sdca_functions.c