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-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bd664f892e3e2b01c79197cad3111d54b7aedf39;p=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 eb05efb74eed8..1d314f1f95fed 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); }