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 09:54:08 +0000 (10:54 +0100)
commit57bc8985753ca65d6a5ecae46cdd5d7e38ff447e
tree809b5a76cd39b48d263f46e3dd3be02417a3cce6
parent676049a3d2c6ae7156ec123755b9b99574b7ac4d
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