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: v4.3-rc1~86^2~96 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bd664f892e3e2b01c79197cad3111d54b7aedf39;p=karo-tx-linux.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); }