ASoC: codecs: rk817 fix shut down crash issue

Requesting system reboot
[    7.936347] Unable to handle kernel NULL pointer dereference at virtual address 00000044
[    7.937081] pgd = (ptrval)
[    7.937332] [00000044] *pgd=3d817835, *pte=00000000, *ppte=00000000
[    7.937917] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[    7.938402] Modules linked in:
[    7.938699] CPU: 0 PID: 631 Comm: init Not tainted 4.19.111 #100
[    7.939238] Hardware name: Generic DT based system
[    7.939686] PC is at snd_soc_component_update_bits+0x8/0x70
[    7.940203] LR is at rk817_codec_power_down+0x170/0x1cc

Change-Id: I68bb761346322750214f9fae8537d825d72f4a44
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
Jianqun Xu
2020-03-28 14:45:07 +08:00
committed by Tao Huang
parent b35ceabc94
commit 2cf509da1d

View File

@@ -1190,8 +1190,8 @@ static void rk817_platform_shutdown(struct platform_device *pdev)
DBG("%s\n", __func__);
rk817_codec_power_down(rk817->component, RK817_CODEC_ALL);
if (rk817 && rk817->component)
rk817_codec_power_down(rk817->component, RK817_CODEC_ALL);
}
static const struct of_device_id rk817_codec_dt_ids[] = {