Skip to content

Commit 973b393

Browse files
lyakhbroonie
authored andcommitted
ASoC: SOF: Intel: hda-ipc: fix reply size checking
Checking that two values don't have common bits makes no sense, strict equality is meant. Fixes: f3b433e ("ASoC: SOF: Implement Probe IPC API") Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6b994c5 commit 973b393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/intel/hda-ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
107107
} else {
108108
/* reply correct size ? */
109109
if (reply.hdr.size != msg->reply_size &&
110-
/* getter payload is never known upfront */
111-
!(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) {
110+
/* getter payload is never known upfront */
111+
((reply.hdr.cmd & SOF_GLB_TYPE_MASK) != SOF_IPC_GLB_PROBE)) {
112112
dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n",
113113
msg->reply_size, reply.hdr.size);
114114
ret = -EINVAL;

0 commit comments

Comments
 (0)