lkml.org 
[lkml]   [2024]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing
On Tue, Jan 9, 2024 at 4:47 AM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> Following commit 13f58267cda3 ("ASoC: soc.h: don't create dummy
> Component via COMP_DUMMY()"), the dai_name field is only populated for
> dummy components after the card is registered. This causes a null
> pointer dereference in the mt8192-mt6359 sound card driver's probe
> function when searching for a dai_name among all the card's dai links.
>
> Verify that the dai_name is non-null before passing it to strcmp. While
> at it, also check that there's at least one codec.
>
> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> Closes: https://linux.kernelci.org/test/case/id/6582cd6d992645c680e13478/
> Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>

Audio now works again on my MT8192 Hayato.

\
 
 \ /
  Last update: 2024-01-09 04:45    [W:0.059 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site