ASoC: core: Invoke pcm_new() for all DAI-link
authorRohit kumar <rohitkr@codeaurora.org>
Thu, 1 Nov 2018 12:38:49 +0000 (18:08 +0530)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:13 +0000 (14:58 +0900)
commit7f1ca410af2ebad5b1c92fdc94b723574e6ccd3f
tree7b2b5462f08f9000f9f32598949f8009ebf71c03
parent9f862371a103b8cc86667bc19b94dcbd44bae87d
ASoC: core: Invoke pcm_new() for all DAI-link

Remove no_pcm check to invoke pcm_new() for backend dai-links
too. This fixes crash in hdmi codec driver during hdmi_codec_startup()
while accessing chmap_info struct. chmap_info struct memory is
allocated in pcm_new() of hdmi codec driver which is not invoked
in case of DPCM when hdmi codec driver is part of backend dai-link.

Below is the crash stack:

[   61.635493] Unable to handle kernel NULL pointer dereference at virtual address 00000018
..
[   61.666696]   CM = 0, WnR = 1
[   61.669778] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc0d6633000
[   61.676526] [0000000000000018] *pgd=0000000153fc8003, *pud=0000000153fc8003, *pmd=0000000000000000
[   61.685793] Internal error: Oops: 96000046 [#1] PREEMPT SMP
[   61.722955] CPU: 7 PID: 2238 Comm: aplay Not tainted 4.14.72 #21
..
[   61.740269] PC is at hdmi_codec_startup+0x124/0x164
[   61.745308] LR is at hdmi_codec_startup+0xe4/0x164

Change-Id: I1335d13ffb7f0fd1ba10884ff23b81b6b51a3889
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
sound/soc/soc-core.c