Unverified Commit 7bd220f2 authored by YC Hung's avatar YC Hung Committed by Mark Brown
Browse files

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: default avatarYC Hung <yc.hung@mediatek.com>
Reviewed-by: default avatarCurtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20221213115617.25086-1-yc.hung@mediatek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6c900dcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ void mtk_adsp_dump(struct snd_sof_dev *sdev, u32 flags)
{
	char *level = (flags & SOF_DBG_DUMP_OPTIONAL) ? KERN_DEBUG : KERN_ERR;
	struct sof_ipc_dsp_oops_xtensa xoops;
	struct sof_ipc_panic_info panic_info;
	struct sof_ipc_panic_info panic_info = {};
	u32 stack[MTK_ADSP_STACK_DUMP_SIZE];
	u32 status;