diff options
author | Dave Jiang <dave.jiang@intel.com> | 2021-04-15 16:37:44 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-04-20 16:43:53 +0530 |
commit | 75b911309060f42ba94bbbf46f5f497d35d5cd02 (patch) | |
tree | 029ca751f093b8924da9959f64b4997c3130a5f6 /drivers/dma/idxd/device.c | |
parent | 7c5dd23e57c14cf7177b8a5e0fd08916e0c60005 (diff) |
dmaengine: idxd: fix engine conf_dev lifetime
Remove devm_* allocation and fix engine->conf_dev 'struct device'
lifetime. Address issues flagged by CONFIG_DEBUG_KOBJECT_RELEASE.
Add release functions in order to free the allocated memory at the
engine conf_dev destruction time.
Reported-by: Jason Gunthorpe <jgg@nvidia.com>
Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161852986460.2203940.16603218225412118431.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/device.c')
-rw-r--r-- | drivers/dma/idxd/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index c4183294a704..be1dcddfe3c4 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -786,7 +786,7 @@ static int idxd_engines_setup(struct idxd_device *idxd) } for (i = 0; i < idxd->max_engines; i++) { - eng = &idxd->engines[i]; + eng = idxd->engines[i]; group = eng->group; if (!group) |