dmaengine: fsl-edma: fix miss mutex unlock at an error return path
authorFrank Li <Frank.Li@nxp.com>
Thu, 11 Apr 2024 20:39:35 +0000 (16:39 -0400)
committerVinod Koul <vkoul@kernel.org>
Wed, 17 Apr 2024 17:09:52 +0000 (22:39 +0530)
commitb52e28eca7da47fa389605a8eda1952a9fa3c69f
treeaf66daf511a23dd8cddf51cb2a50d687e9c4d07d
parent4665be0e952f68306cc6fba2cce68b940a7ec78c
dmaengine: fsl-edma: fix miss mutex unlock at an error return path

Use cleanup to manage mutex. Let compiler to do scope guard automatically.

Fixes: 6aa60f79e679 ("dmaengine: fsl-edma: add safety check for 'srcid'")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202404110915.riwV3ZAC-lkp@intel.com/
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240411203935.3137158-1-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/fsl-edma-common.c
drivers/dma/fsl-edma-main.c