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: f3b433e469  ("ASoC: SOF: Implement Probe IPC API")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210802151749.15417-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Guennadi Liakhovetski 2021-08-02 10:17:49 -05:00 committed by Mark Brown
parent 6b994c554e
commit 973b393fdf
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
/* reply correct size ? */ /* reply correct size ? */
if (reply.hdr.size != msg->reply_size && if (reply.hdr.size != msg->reply_size &&
/* getter payload is never known upfront */ /* getter payload is never known upfront */
!(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) { ((reply.hdr.cmd & SOF_GLB_TYPE_MASK) != SOF_IPC_GLB_PROBE)) {
dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n", dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n",
msg->reply_size, reply.hdr.size); msg->reply_size, reply.hdr.size);
ret = -EINVAL; ret = -EINVAL;