From: Johannes Thumshirn Date: Thu, 9 Jul 2015 07:39:42 +0000 (+0200) Subject: cxl: Destroy afu->contexts_idr on release of an afu X-Git-Tag: firefly_0821_release~176^2~1149^2~96 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bd664f892e3e2b01c79197cad3111d54b7aedf39;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Ian Munsie Signed-off-by: Michael Ellerman --- 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); }