diff options
author | YC Hung <yc.hung@mediatek.com> | 2022-12-13 12:56:17 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-12-13 19:16:32 +0100 |
commit | 7bd220f2ba9014b78f0304178103393554b8c4fe (patch) | |
tree | 2bc19e6263042fad5db75a0a811868246075f044 /sound/soc | |
parent | ASoC: rt5670: Remove unbalanced pm_runtime_put() (diff) | |
download | linux-7bd220f2ba9014b78f0304178103393554b8c4fe.tar.xz linux-7bd220f2ba9014b78f0304178103393554b8c4fe.zip |
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 <yc.hung@mediatek.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20221213115617.25086-1-yc.hung@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sof/mediatek/mtk-adsp-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/mediatek/mtk-adsp-common.c b/sound/soc/sof/mediatek/mtk-adsp-common.c index 1e0769c668a7..de8dbe27cd0d 100644 --- a/sound/soc/sof/mediatek/mtk-adsp-common.c +++ b/sound/soc/sof/mediatek/mtk-adsp-common.c @@ -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; |