Skip to content

Commit

Permalink
cxl: Destroy afu->contexts_idr on release of an afu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Thumshirn authored and Michael Ellerman committed Jul 16, 2015
1 parent b2a02ac commit bd664f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/misc/cxl/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit bd664f8

Please sign in to comment.