]> 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>
Tue, 21 Jun 2022 12:15:33 +0000 (13:15 +0100)
commitaaeb8437f56e2eb642aaf6895b14d951d40c6aa7
treee793185a39fd67f0df1a1b60b534250b3dbaa057
parent24b735d4a98bee8c162c2ecf2e5a4fb1063867da
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