* [bug report] ASoC: Intel: Refactor common IPC/mailbox code into generic APIs
@ 2017-10-10 8:14 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-10-10 8:14 UTC (permalink / raw)
To: yao.jin; +Cc: alsa-devel
Hello Jin Yao,
The patch a33c1ec5cf82: "ASoC: Intel: Refactor common IPC/mailbox
code into generic APIs" from Apr 7, 2015, leads to the following
static checker warning:
sound/soc/intel/common/sst-ipc.c:242 sst_ipc_reply_find_msg()
error: uninitialized symbol 'mask'.
sound/soc/intel/common/sst-ipc.c
226 struct ipc_message *sst_ipc_reply_find_msg(struct sst_generic_ipc *ipc,
227 u64 header)
228 {
229 struct ipc_message *msg;
230 u64 mask;
231
232 if (ipc->ops.reply_msg_match != NULL)
233 header = ipc->ops.reply_msg_match(header, &mask);
What should "mask" be initialized to if ops.reply_msg_match is NULL?
234
235 if (list_empty(&ipc->rx_list)) {
236 dev_err(ipc->dev, "error: rx list empty but received 0x%llx\n",
237 header);
238 return NULL;
239 }
240
241 list_for_each_entry(msg, &ipc->rx_list, list) {
242 if ((msg->header & mask) == header)
^^^^^^^^^^^^^^^^^^
Used uninitialized here.
243 return msg;
244 }
245
246 return NULL;
247 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-10 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 8:14 [bug report] ASoC: Intel: Refactor common IPC/mailbox code into generic APIs Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.