]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt711-sdca: fix kernel NULL pointer dereference when IO error
authorShuming Fan <shumingf@realtek.com>
Tue, 21 Jun 2022 09:07:19 +0000 (17:07 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jun 2022 15:21:57 +0000 (16:21 +0100)
commit8f3249ca5f604acd8575c55dc64b17fba8a7bc69
tree3197f3271e9fd7be1f1c9d8e85b75fc26ec99cb6
parent4b494a273cdc71da7a71d06000c43a5171eedcc2
ASoC: rt711-sdca: fix kernel NULL pointer dereference when IO error

The initial settings will be written before the codec probe function.
But, the rt711->component doesn't be assigned yet.
If IO error happened during initial settings operations, it will cause the kernel panic.
This patch changed component->dev to slave->dev to fix this issue.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20220621090719.30558-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt711-sdca.c