Skip to content

Commit

Permalink
ASoC: SOF: Intel: hda-ipc: fix reply size checking
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
lyakh authored and broonie committed Aug 3, 2021
1 parent 6b994c5 commit 973b393
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/hda-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
} else {
/* reply correct size ? */
if (reply.hdr.size != msg->reply_size &&
/* getter payload is never known upfront */
!(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) {
/* getter payload is never known upfront */
((reply.hdr.cmd & SOF_GLB_TYPE_MASK) != SOF_IPC_GLB_PROBE)) {
dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n",
msg->reply_size, reply.hdr.size);
ret = -EINVAL;
Expand Down

0 comments on commit 973b393

Please sign in to comment.