diff mbox

cxl: Destroy afu->contexts_idr on release of an afu

Message ID 1436427582-12777-1-git-send-email-jthumshirn@suse.de (mailing list archive)
State Accepted
Delegated to: Michael Ellerman
Headers show

Commit Message

Johannes Thumshirn July 9, 2015, 7:39 a.m. UTC
Destroy afu->contexts_idr on release of an afu, reclaiming the allocated
memory.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/misc/cxl/pci.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ian Munsie July 10, 2015, 1:28 a.m. UTC | #1
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Michael Ellerman July 16, 2015, 9:54 a.m. UTC | #2
On Thu, 2015-09-07 at 07:39:42 UTC, Johannes Thumshirn wrote:
> 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>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/bd664f892e3e2b01c791

cheers
diff mbox

Patch

diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index c68ef58..16b8e75a 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);
 }