summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@intel.com>2019-08-27 16:17:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-05 13:14:06 +0200
commitf1592b7543505efb10b821ce4112bc4bf22ac52a (patch)
tree6105fa4ac8efd6a66f6c8fe4ac0dfcc948a43e2b /sound
parent6c03deb9baf9d9ae001e01048800941081b20c75 (diff)
downloadlinux-stable-f1592b7543505efb10b821ce4112bc4bf22ac52a.tar.gz
linux-stable-f1592b7543505efb10b821ce4112bc4bf22ac52a.tar.bz2
linux-stable-f1592b7543505efb10b821ce4112bc4bf22ac52a.zip
ASoC: Intel: Fix use of potentially uninitialized variable
commit 810f3b860850148788fc1ed8a6f5f807199fed65 upstream. If ipc->ops.reply_msg_match is NULL, we may end up using uninitialized mask value. reported by smatch: sound/soc/intel/common/sst-ipc.c:266 sst_ipc_reply_find_msg() error: uninitialized symbol 'mask'. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@intel.com> Link: https://lore.kernel.org/r/20190827141712.21015-3-amadeuszx.slawinski@linux.intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/common/sst-ipc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/intel/common/sst-ipc.c b/sound/soc/intel/common/sst-ipc.c
index b95411ed0b62..9b659c130724 100644
--- a/sound/soc/intel/common/sst-ipc.c
+++ b/sound/soc/intel/common/sst-ipc.c
@@ -222,6 +222,8 @@ struct ipc_message *sst_ipc_reply_find_msg(struct sst_generic_ipc *ipc,
if (ipc->ops.reply_msg_match != NULL)
header = ipc->ops.reply_msg_match(header, &mask);
+ else
+ mask = (u64)-1;
if (list_empty(&ipc->rx_list)) {
dev_err(ipc->dev, "error: rx list empty but received 0x%llx\n",