]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
cxl: Destroy afu->contexts_idr on release of an afu
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 9 Jul 2015 07:39:42 +0000 (09:39 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jul 2015 04:15:07 +0000 (14:15 +1000)
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>
drivers/misc/cxl/pci.c

index eb05efb74eed8d0c20f9f49521ef3325ffb97972..1d314f1f95fed4c4702419d6cfb40f50781a027c 100644 (file)
@@ -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);
 }