dmaengine: idxd: Add missing cleanups in cleanup internals
authorShuai Xue <xueshuai@linux.alibaba.com>
Fri, 4 Apr 2025 12:02:13 +0000 (20:02 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 14 May 2025 13:40:39 +0000 (14:40 +0100)
commit61d651572b6c4fe50c7b39a390760f3a910c7ccf
tree8fb77f0c88882e5de2933e2e2bdc0fc13e7c965a
parent61259fb96e023f7299c442c48b13e72c441fc0f2
dmaengine: idxd: Add missing cleanups in cleanup internals

The idxd_cleanup_internals() function only decreases the reference count
of groups, engines, and wqs but is missing the step to release memory
resources.

To fix this, use the cleanup helper to properly release the memory
resources.

Fixes: ddf742d4f3f1 ("dmaengine: idxd: Add missing cleanup for early error out in probe call")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250404120217.48772-6-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/init.c