Skip to content

Commit 7bd220f

Browse files
yaochunhungbroonie
authored andcommitted
ASoC: SOF: mediatek: initialize panic_info to zero
Coverity spotted that panic_info is not initialized to zero in mtk_adsp_dump. Using uninitialized value panic_info.linenum when calling snd_sof_get_status. Fix this coverity by initializing panic_info struct as zero. Signed-off-by: YC Hung <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6c900dc commit 7bd220f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sof/mediatek/mtk-adsp-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void mtk_adsp_dump(struct snd_sof_dev *sdev, u32 flags)
6060
{
6161
char *level = (flags & SOF_DBG_DUMP_OPTIONAL) ? KERN_DEBUG : KERN_ERR;
6262
struct sof_ipc_dsp_oops_xtensa xoops;
63-
struct sof_ipc_panic_info panic_info;
63+
struct sof_ipc_panic_info panic_info = {};
6464
u32 stack[MTK_ADSP_STACK_DUMP_SIZE];
6565
u32 status;
6666

0 commit comments

Comments
 (0)