ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
authorCezary Rojewski <cezary.rojewski@intel.com>
Thu, 16 Dec 2021 11:57:39 +0000 (12:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:14 +0000 (11:04 +0100)
commit56c3b723859416be3c5bb3b86cab7f8fc8087868
tree46b68d4e1c272fda29bf88f104822b89e2895def
parent9bc6d3abccbfd46ca22488201622c0b42e68c347
ASoC: Intel: catpt: Test dmaengine_submit() result before moving on

[ Upstream commit 2a9a72e290d4a4741e673f86b9fba9bfb319786d ]

After calling dmaengine_submit(), the submitted transfer descriptor
belongs to the DMA engine. Pointer to that descriptor may no longer be
valid after the call and should be tested before awaiting transfer
completion.

Reported-by: Kevin Tian <kevin.tian@intel.com>
Suggested-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 4fac9b31d0b9 ("ASoC: Intel: Add catpt base members")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20211216115743.2130622-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/catpt/dsp.c