diff options
author | Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> | 2021-08-02 10:17:49 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-03 01:44:59 +0100 |
commit | 973b393fdf073a4ebd8d82ef6edea99fedc74af9 (patch) | |
tree | 5aa3a0883fc4c00ae7047dbfe9c6f908239767b3 /sound | |
parent | 6b994c554ebc4c065427f510db333081cbd7228d (diff) |
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: f3b433e4699f ("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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/intel/hda-ipc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index c91aa951df22..acfeca42604c 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -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; |