From: Amadeusz Sławiński <amadeuszx.slawin...@intel.com> 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.slawin...@intel.com> Link: https://lore.kernel.org/r/20190827141712.21015-3-amadeuszx.slawin...@linux.intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.boss...@linux.intel.com> Signed-off-by: Mark Brown <broo...@kernel.org> Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- sound/soc/intel/common/sst-ipc.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/soc/intel/common/sst-ipc.c +++ b/sound/soc/intel/common/sst-ipc.c @@ -211,6 +211,8 @@ struct ipc_message *sst_ipc_reply_find_m 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",