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 eb05efb..1d314f1 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);
 }