aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/pci.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2015-07-09 09:39:42 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2015-07-16 14:15:07 +1000
commitbd664f892e3e2b01c79197cad3111d54b7aedf39 (patch)
tree7e978b29c0ffac148696e69df8db7a3b4b4d86ca /drivers/misc/cxl/pci.c
parentcxl: Destroy cxl_adapter_idr on module_exit (diff)
downloadlinux-dev-bd664f892e3e2b01c79197cad3111d54b7aedf39.tar.xz
linux-dev-bd664f892e3e2b01c79197cad3111d54b7aedf39.zip
cxl: Destroy afu->contexts_idr on release of an afu
Destroy afu->contexts_idr on release of an afu, reclaiming the allocated memory. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/pci.c')
-rw-r--r--drivers/misc/cxl/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index eb05efb74eed..1d314f1f95fe 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -551,6 +551,7 @@ static void cxl_release_afu(struct device *dev)
pr_devel("cxl_release_afu\n");
+ idr_destroy(&afu->contexts_idr);
kfree(afu);
}